I'd like to suggest to my technical team (DD4T Java) a DD4T version of In-page Component Presentation-based Navigation. In other words, we want to create something like the following.
<ul> <li><a href="#CP1"></li> ... <li><a href="#CPN"></li> </ul>
On the same page we have the Component Presentations (CPs):
<div id="CP1">...</div> ... <div id="CPN">...</div>
Bookmark link and matching ID might be based on order, title, or "heading" fields. This is not Structure-Group based Navigation as mentioned in Robert's question.
This seems equivalent to one of Harold's answers, that includes:
- "Widget" -- New Component Template (and maybe dummy Component) to output the details
- Matching DD4T ComponentPresentationRenderer calls the action to output navigation
At a high-level, what should my developer work on to get the Component titles (or select fields) from the CPs on a given page?
- Would a view for each link make sense?
- Should the bookmark link markup go in the page view?
- The navigational links are not on every page. They would be added to a page via Page metadata (
include bookmark navoption or with a "Widget" CP that editors place on the page)
- The markup would ideally be the same, but may differ by pages (abstracting the links would be a good idea)
- Pages embed CPs dynamically (on the page, but with dynamic Component Templates)