Global Exports

Global elements allow additional elements to be pulled into a navigation beyond the standard four elements (i.e., Name, xID, URL, and Schema) and for all navigations in a site, including those within components.

Note: Global elements will not pull in elements from components.

Global exports are defined by XPath expressions within the CMS Administration UI. If data matching the XPath expression exists on a page that is linked to, that data is exported to the page that contains the link. Once a global export has been added, all navigations will include the element value wherever the element has a value that matches the XPath expression. Any text value stored in an element on the page can be set as a global export. Global navigation exports resolve slightly slower than standard navigations, stemming from the additional step of collecting export values, but the difference is negligible.

The best way to understand how a global export in navigations work is by example. Suppose you're building a navigation list and want a relevant thumbnail to display beside navigation list items that have an image within the targeted page. The following XML is of a page containing an image element that will serve as a navigation thumbnail.

XML of Page for Global Export

In this scenario, we need to return the image path for those linked pages that contain an image.

To set this global export:

  1. Navigate to Administration > System Options > CMS > Publishing > Navigation Exports.
  2. Provide a name for the global export. In this example, the name is myGloballyExportedImage.
  3. Provide the XPath expression (e.g., /*/Image) that will return the image path to the navigation list when an image element exists within pages.

    Global Export for Navigation -- Image Example

    Note: For help with XPath syntax and examples, see Microsoft's XPath reference.

  4. Save the new global export.
  5. Ensure that the XPath expression provided is valid by navigating to Site > XML tab for a page that contains a navigation element.
  6. Search for the name of the global export within the XML (i.e., myGloballyExportedImage):

    Navigation Element containing Resolved Global Export Value

    In this example, two pages, x132 and x151, contain image elements that match the XPath expression provided in the Navigation Exports UI. When the XPath expression finds matches, the system returns their image paths to the navigation, making these values available for presentation within your organization's website.

Important: Global exports work against a preprocessed version of the page. Because of this added efficiency, global exports should be used wherever possible instead of local exports.