Documentation Center

Parameters for the page field

To fetch a Page, identify its namespace, Publication ID, and either its Page ID or relative URL. Alternatively, you can also fetch a Page using only its Content Manager URI. Adding specific context data lets you fetch absolute links rather than relative ones.

The following page call fetches a Page using the identifiers of its namespace (1 for SDL Tridion Sites, 2 for SDL Tridion Docs), Publication, and of the Page itself:
page(namespaceId: 1, publicationId: 26, pageId: 24113)

The above call fetches the page with identifier 24113 from the SDL Tridion Sites Publication with ID 26.

The following page call fetches a Page using the identifiers of its namespace, Publication, and the relative URL of the webpage corresponding to this Page on the published website:
page(namespaceId: 2, publicationId: 26, url: "/pressreleases/index.html")

The above call fetches the Page corresponding to the URL http://www.example.com/pressreleases/index.html (where http://www.example.com is the published website) from the SDL Tridion Docs Publication with ID 26.

To fetch a Page using its Content Manager URI only, include a call like the following in your query:
page(cmUri: "tcm:6-228-64")

The above call fetches the Page with the SDL Tridion Sites Content Manager URI tcm:6-228-64, which uniquely identifies the item.

page(cmUri: "ish:16-984-64")

The above call fetches the Page with the SDL Tridion Docs Content Manager URI ish:16-984-64, which uniquely identifies the item.

page(pageId: 275292, publicationId: 2287238, namespaceId: 1,
      contextData: [
      {uri:"taf:tcdl:render:link:relative", value:"false", type:BOOLEAN}])

The above call fetches the Page specified in the first three parameters, and ensures that links in the Page are rendered as fully qualified links, rather than relative links thanks to the last parameter, contextData.