jumpcomments

Jump directly to the [[comments]]

How can you let your readers jump directly to the comments on a ditail page instead of to the top where the item is repeated again?

I think this is quite easy to implement.

  1. Go the the template you use to show your main index
  2. Find the ‘comments’ part of the template, and look for the part where the link is made <a href=<%itemlink%>

add something like this: #comments this should result in: <a href=<%itemlink%>#comments

  1. Go to the skin you use for your detailpage (with the commentform on it, and find teh place where you want your readers to enter

1) top of the comments already posted: <%comments(templatename)%>

	1) top of the commentform (so probably jumping over the [[comments]] already posted): ''<%commentform%>''
- on either of those locations you add: ''<a name="[[comments]]"></a>'' and you're done. When a user clicks the [[comments]] link he will not have to scroll through the [[item]], and start directly with the posted [[comments]], or even lower: with and add [[comments]] form.

Comment by Anne van Kesteren:

If you want to make your weblog validate as XHTML1.0 strict or higher (or HTML4.01 strict) consider this:

<h2 id=”comments“>Comments</h2>

:: [[Howto‘s]] ::

 
jumpcomments.txt · Last modified: 2006/07/05 13:03