4

I am working with a client that has DXA 2.0 (.NET) and SDL Web 8.1.

  • DXA Unity.config is configured to use the DynamicNavigationProvider
  • The Sitemap [Navigation] Category has been published
  • Pages have been associated with the keywords from the Category using the sitemapKeyword metadata field
  • The Pages have been Published

When I make a request to the following URL, in the json returned, none of the Keywords have an URL Property associated with them.

http://localhost:55517/api/navigation/subtree?descendantLevels=3

If I use the content service to retrieve the Pages associated with one of the Navigation Keywords all of the expected Pages are returned.

I have set all of the caching in the Microservices to a very short timeframe and have verified that this is not a caching issue.

How/where does the DXA Framework/Microservices get the URL Property?

2 Answers 2

2

Unlike Structure Groups, Categories and Keywords don't have a URL of themselves. In order to simulate a Navigation Model built from Structure Groups, the following algorithm is used:

  • If the Taxonomy Node (Keyword) has classified Pages and one of those Pages is an Index Page (i.e. has a URL ending with /index), the Taxonomy Node gets the URL of the Structure Group containing that Index Page. For example:
    • A Taxonomy Node which has a classified Page with URL /autotest-parent/regression/taxonomy/index will get the URL: /autotest-parent/regression/taxonomy
    • A Taxonomy Node which has a classified Page with URL /index (the Site Home Page) will get the URL: /
    • A Taxonomy Node which does not have a classified Index Page does not get a URL (null)`
  • The Taxonomy Root Node (Category) cannot have classified Pages itself and will therefore not have a URL.
  • If a Taxonomy Node does not have a URL, its Visible property will be set to false, resulting in the item not showing up in Top Navigation and Context Navigation (it should show up in Breadcrumb and Sitemap, though).
  • If classified Pages are not included in the subtree (on-demand Navigation scenario), we don't have enough information to determine the Taxonomy Node URL and it will therefore not be set (null).
1
  • So in my case, the pages I have associated the keywords with have the filename being index but, the TaxonomyNode is not showing the URL property. Commented Aug 30, 2018 at 14:19
0

The URL Property being null in this case is due to the following configuration in the Deployer Microservice cd_storage_conf.xml

<Taxonomies CountEnabled="false"/>

This configures the taxonomy reference count for keywords, if CountEnabled is set to False the reference count for keywords will not get updated. The default setting is that the keyword counts are enabled. In the out of the box cd_storage_conf.xml this entry is commented out.

DXA 2.0 DynamicNavigation with Category and Keywords is dependent upon the Broker database containing the reference counts for the Keywords. After changing the Deployer's config and republishing the Category I was able to see the URL's for the Keywords.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.