> ## Documentation Index
> Fetch the complete documentation index at: https://docs.opigno.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Learning path Homepage

### **🧭 How Users Access the Learning Path Homepage**

The most common way users reach the **Learning Path Homepage (LP HP)** is through the **catalog page**. Each catalog tile includes a **View** button, which redirects the user to the corresponding Learning Path homepage.

To support this behavior, each catalog node(LP) includes a **Call to Action (CTA)** with the action ID `VIEW_LP`. This CTA provides all the necessary metadata for redirecting the user to the correct Learning Path.

<Note>
  A **Call to Action (CTA)** object defines which actions a user can perform on a particular Learning Path. The available CTAs depend on the current **learning state** for that Learning Path — including enrollment status, completion, scores, or access eligibility.
</Note>

Below is an example of the `getCatalogData` query, which returns a list of catalog items along with the **CTAs** available for each Learning Path based on the current user's learning state.

<CodeGroup>
  ```GraphQL GraphQL theme={null}
  query getCatalogData {
    getCatalogData(first: 1) {
      edges {
        node {
          cta {
            actionId
            title
            arguments {
              key
              value
            }
            metadata {
              key
              value
            }
          }
        }
      }
    }
  }
  ```

  ```Query Query result [expandable] theme={null}
  {
      "data": {
          "getCatalogData": {
              "edges": [
                  {
                      "node": {
                          "cta": [
                              {
                                  "actionId": "VIEW_LP",
                                  "title": "View",
                                  "arguments": [
                                      {
                                          "key": "lpId",
                                          "value": "40"
                                      }
                                  ],
                                  "metadata": []
                              },
                              {
                                  "actionId": "ENROLL_LP",
                                  "title": "Enroll",
                                  "arguments": [
                                      {
                                          "key": "lpId",
                                          "value": "40"
                                      }
                                  ],
                                  "metadata": [
                                      {
                                          "key": "type",
                                          "value": "button"
                                      }
                                  ]
                              }
                          ]
                      }
                  }
              ]
          }
      }
  }
  ```
</CodeGroup>

## **Retrieving a Learning Path Object**

To retrieve Learning Path data, you can use the `getLearningPath` query with the `lpId` argument provided in the `VIEW_LP` CTA:

<CodeGroup>
  ```GraphQL GraphQL [expandable] theme={null}
  query getLearningPath {
    getLearningPath(lpId: 40) {
      id
      userEnrolled
      modulesNumber
      activitiesNumber
      certificationEnabled
      infoMessage {
        type
        title
        description
        status
        cta {
          title
          actionId
          arguments {
            key
            value
          }
          metadata {
            key
            value
          }
        }
      }
      cta {
        title
        actionId
        arguments {
          key
          value
        }
        metadata {
          key
          value
        }
      }
      navigation {
        edgeId
        edgeRid
        title
        description
        navigationPath
        locked
        lockReasons
        image {
          url
        }
        attempt {
          id
          metrics {
            globalScore
            progress
            status
          }
        }
        attemptQuote {
          used
          allowed
        }
        learningContentType
        cta {
          title
          actionId
          arguments {
            key
            value
          }
          metadata {
            key
            value
          }
        }
      }
      training {
        title
        description
        duration {
          name
        }
        domain {
          name
        }
        image {
          alt
          title
          url
        }
        attempt {
          metrics {
            globalScore
            progress
            status
          }
        }
      }
    }
  }
  ```

  ```Query Query result [expandable] theme={null}
  {
      "data": {
          "getLearningPath": {
              "id": "40",
              "userEnrolled": false,
              "modulesNumber": 2,
              "activitiesNumber": 3,
              "certificationEnabled": false,
              "infoMessage": [],
              "cta": [
                  {
                      "title": "View",
                      "actionId": "VIEW_LP",
                      "arguments": [
                          {
                              "key": "lpId",
                              "value": "40"
                          }
                      ],
                      "metadata": []
                  },
                  {
                      "title": "Enroll",
                      "actionId": "ENROLL_LP",
                      "arguments": [
                          {
                              "key": "lpId",
                              "value": "40"
                          }
                      ],
                      "metadata": [
                          {
                              "key": "type",
                              "value": "button"
                          }
                      ]
                  }
              ],
              "navigation": [
                  {
                      "edgeId": "116",
                      "edgeRid": "488",
                      "title": "Target Results of 2024",
                      "description": "<p>Distinctively leverage other's viral initiatives and open-source deliverables. Globally morph ubiquitous vortals vis-a-vis go forward leadership. Quickly synthesize focused \"outside the box\" thinking via resource-leveling communities. Quickly synergize team building expertise with pandemic action items. Distinctively engage team building expertise.</p>",
                      "navigationPath": null,
                      "locked": true,
                      "lockReasons": [
                          "Complete prior module"
                      ],
                      "image": [],
                      "attempt": null,
                      "attemptQuote": null,
                      "learningContentType": "QUIZ",
                      "cta": []
                  },
                  {
                      "edgeId": "119",
                      "edgeRid": "485",
                      "title": "Future goals",
                      "description": null,
                      "navigationPath": null,
                      "locked": true,
                      "lockReasons": [
                          "Complete prior module"
                      ],
                      "image": [],
                      "attempt": null,
                      "attemptQuote": null,
                      "learningContentType": "QUIZ",
                      "cta": []
                  }
              ],
              "training": {
                  "title": "How to build High-Load Infrastructure in 2025",
                  "description": "<p>Enthusiastically impact covalent solutions via web-enabled e-services. Efficiently scale real-time technology without team building meta-services. Compellingly reinvent focused ideas via intuitive niches. Competently incubate market positioning outsourcing and customer directed markets. Efficiently maintain seamless technology after visionary e-tailers.</p><p>Synergistically deploy.</p>",
                  "duration": [
                      {
                          "name": "1 min"
                      }
                  ],
                  "domain": [
                      {
                          "name": "Domain 1"
                      }
                  ],
                  "image": [
                      {
                          "alt": null,
                          "title": "slide_IMG_8336.jpeg",
                          "url": "http://opigno4-project.docksal.site/sites/default/files/2025-01/slide_IMG_8336.jpeg"
                      }
                  ],
                  "attempt": null
              }
          }
      }
  }
  ```
</CodeGroup>

The example getLearningPath query response can be structured into distinct sections:

<AccordionGroup>
  <Accordion title="1. General Learning path metadata">
    ```
    "id": "40",
    "userEnrolled": false,
    "modulesNumber": 2,
    "activitiesNumber": 3,
    "certificationEnabled": false,
    "infoMessage": [],
    ```
  </Accordion>

  <Accordion title="2. General training data">
    ```
    "training": {
        "title": "How to build High-Load Infrastructure in 2025",
        "description": "<p>Enthusiastically impact covalent solutions via web-enabled e-services. Efficiently scale real-time technology without team building meta-services. Compellingly reinvent focused ideas via intuitive niches. Competently incubate market positioning outsourcing and customer directed markets. Efficiently maintain seamless technology after visionary e-tailers.</p><p>Synergistically deploy.</p>",
        "duration": [
            {
                "name": "1 min"
            }
        ],
        "domain": [
            {
                "name": "Domain 1"
            }
        ],
        "image": [
            {
                "alt": null,
                "title": "slide_IMG_8336.jpeg",
                "url": "http://opigno4-project.docksal.site/sites/default/files/2025-01/slide_IMG_8336.jpeg"
            }
        ],
        "attempt": null
    }
    ```
  </Accordion>

  <Accordion title="3. CTA objects avaliable for the LearningPath">
    ```
    "cta": [
        {
            "title": "View",
            "actionId": "VIEW_LP",
            "arguments": [
                {
                    "key": "lpId",
                    "value": "40"
                }
            ],
            "metadata": []
        },
        {
            "title": "Enroll",
            "actionId": "ENROLL_LP",
            "arguments": [
                {
                    "key": "lpId",
                    "value": "40"
                }
            ],
            "metadata": [
                {
                    "key": "type",
                    "value": "button"
                }
            ]
        }
    ]
    ```
  </Accordion>

  <Accordion title="4. Navigation edges within the Learning Path">
    ```
    "navigation": [
        {
            "edgeId": "116",
            "edgeRid": "488",
            "title": "Target Results of 2024",
            "description": "<p>Distinctively leverage other's viral initiatives and open-source deliverables. Globally morph ubiquitous vortals vis-a-vis go forward leadership. Quickly synthesize focused \"outside the box\" thinking via resource-leveling communities. Quickly synergize team building expertise with pandemic action items. Distinctively engage team building expertise.</p>",
            "navigationPath": null,
            "locked": true,
            "lockReasons": [
                "Complete prior module"
            ],
            "image": [],
            "attempt": null,
            "attemptQuote": null,
            "learningContentType": "QUIZ",
            "cta": []
        },
        {
            "edgeId": "119",
            "edgeRid": "485",
            "title": "Future goals",
            "description": null,
            "navigationPath": null,
            "locked": true,
            "lockReasons": [
                "Complete prior module"
            ],
            "image": [],
            "attempt": null,
            "attemptQuote": null,
            "learningContentType": "QUIZ",
            "cta": []
        }
    ],
    ```
  </Accordion>
</AccordionGroup>

Using the information provided by the API, you can build the Learning Path Homepage as demonstrated in our learner area.

<img style={{ borderRadius:"0.5rem" }} src="https://mintcdn.com/connect-i/duHonZHPe3F63_yi/images/2c9e9102-101e-414b-b9b7-7a7c56d89036.gif?s=969ec4e54dd91ae64f5523912249338d" width="1920" height="935" data-path="images/2c9e9102-101e-414b-b9b7-7a7c56d89036.gif" />

At this point, all training content will appear locked, as the user has not yet enrolled in the Learning Path. For details on how users can be enrolled, please refer to the **Learning Path Enrollment** section.
