Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Dynamic Anchors
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Brent  
View profile  
 More options Dec 19 2011, 5:16 am
From: Brent <br...@ennl.eu>
Date: Mon, 19 Dec 2011 02:16:41 -0800 (PST)
Local: Mon, Dec 19 2011 5:16 am
Subject: Dynamic Anchors
Hi,

Is there a piece of code which can create anchors to all contentitems
which are displayed on a webpage?

TNX


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Chris Falzone  
View profile  
 More options Dec 19 2011, 6:36 am
From: Chris Falzone <chris.falz...@dotcms.com>
Date: Mon, 19 Dec 2011 06:36:24 -0500
Local: Mon, Dec 19 2011 6:36 am
Subject: Re: [dotcms] Dynamic Anchors

Not specifically .. however in the precode of the container you could loop
over the contents and build the Links / Anchors.  Then in the code section
of the container just output the anchor.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Chris Falzone  
View profile  
 More options Dec 19 2011, 7:16 am
From: Chris Falzone <chris.falz...@dotcms.com>
Date: Mon, 19 Dec 2011 07:16:44 -0500
Local: Mon, Dec 19 2011 7:16 am
Subject: Re: [dotcms] Dynamic Anchors

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.

On Mon, Dec 19, 2011 at 6:36 AM, Chris Falzone <chris.falz...@dotcms.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Brent  
View profile  
 More options Dec 19 2011, 10:25 am
From: Brent <br...@ennl.eu>
Date: Mon, 19 Dec 2011 07:25:14 -0800 (PST)
Local: Mon, Dec 19 2011 10:25 am
Subject: Re: Dynamic Anchors
Hi Chris,

This does the trick!

TNX!

On 19 dec, 13:16, Chris Falzone <chris.falz...@dotcms.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »