Is there a piece of code which can create anchors to all contentitems
which are displayed on a webpage?
TNX
--
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To post to this group, send email to dot...@googlegroups.com.
To unsubscribe from this group, send email to dotcms+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/dotcms?hl=en.
This does the trick!
TNX!
On 19 dec, 13:16, Chris Falzone <chris.falz...@dotcms.com> wrote:
> So, just as a proof of concept:
>
> In the container's pre-loop code you could do something like:
>
> <fieldset>
> <legend>Page Navigation</legend>
> <ul>
> #foreach($conIdent in $CONTENTLETS)
> #set($conObj = $dotcontent.find($conIdent))
> <li><a href="#con-${conObj.identifier}">$conObj.title</a></li>
> #end
> </ul>
> </fieldset>
>
> And then in the Code section, something like:
>
> <div class="page_item" id="page-item-$!{ContentIdentifier}">
> <a name="con-$!{ContentIdentifier}"></a>
> <h3>$!{title}</h3>
> $!{body}
> </div>
>
> Should do the trick. Of course if your content might be a little different
> than just a title and body field.
>