Leveraging the API's capabilities for linked items, you can seamlessly retrieve the Web Spotlight navigation with minimal effort.
Retrieve the website tree via API
Web Spotlight brings back terms from traditional CMSs – the root item, pages, and subpages. When Web Spotlight is activated in your project, it models website navigation within your content model. The new content types serve for the page tree navigation on your website. They are also freely editable, so you can use your navigation to keep other related data.Based on the content model, namely the Spotlight’s Subpages element, Web Spotlight creates the page tree visible in Kontent.ai. The navigation can then be easily retrieved via the API. It uses the existing functionality for linked items elements. This way, developers don’t need to write two separate logics for linked items and for navigation.To retrieve the actual content of your page, access your published content via the API and display it on your website the same way as you do with projects without Web Spotlight.
Web Spotlight uses the existing permission model. If a user is allowed to change content items of a given content type, they can do that in Web Spotlight as well. Content that the user doesn’t have permission for is greyed out and displayed as unavailable.
Environmentshave Web Spotlight activated automatically upon their creation.
Cloned projects have Web Spotlight deactivated in the new project. The Subpages element will be converted to the Linked items element in this case. If you activate Web Spotlight for the project, the element will be converted back to the Subpages element, and everything will work as expected.