Dynamic Content Anchors


This snippet creates Anchor Tags and a navigation links for each contentlet in a container.  The idea being that as content is added to the container, it will build a list of links to jump to each contentlet at the top of the page.

Link: http://groups.google.com/group/dotcms/browse_thread/thread/a7fa831e1537bbde?hl=en


## In the container's pre-loop field:

<fieldset class="page_navigation">
    <legend>Page Navigation</legend>
    #foreach($conIdent in $CONTENTLETS)
      #set($conObj = $dotcontent.find($conIdent))
      <li><a href="#con-${conObj.identifier}">$conObj.title</a></li>

## In the container's Code field:

<div class="page_item" id="page-item-$!{ContentIdentifier}">
  <a name="con-$!{ContentIdentifier}"></a>