We've been discussing how to build navigation that is inline with the content that is published from SDL Tridion.
We typically see two approaches:
1) An xml page is published from sdl tridion that contains a list of the published content.
The main advantages are:
Users can publish content and view live before it appears within the website
The XML file is baked, the presentation server only has to read and parse the content
Dis-advantage: - The user has an extra task to do when new content is published / unpublished (If a user removes a page, they need to be aware that the navigation should be republished- this could be quite serious)
2) A dynamic approach - Using the Content Delivery API to pull the page links from the broker database.
The main advantages are: + Navigation is built based on only the published content
The dis-advantages are:
Performance overhead in pulling content from broker database for multiple items/queries
additional code required to cache the file in the delivery website.
I'm thinking of writing a deployer extension that automatically updates an XML file on the presentation server and automatically removes it on un-publish. The implementation could be configurable specify the path of the xml file (in the site or shared location) and which publications make use of this type of navigation xml.
There may be I/O issues I need to take into account when updating the file, but I wanted to run the high-level idea though the experts here as I'm sure there's some points that i'm not considering. For example: is deployer-extension supported in this sense? (I see a lot of functionality is decorated as deprecated)
Any thoughts and comments would be greatly appreciated.