Help - Search - Members - Calendar
Full Version: Entry titles at top of category, like FAQ
Movable Type Community Forum > Additional Resources > Tips and Tricks
appleorch
I used the "recent entries" code to display entry titles as links at the top of each category, but the link takes you to the individual entry. I want the links to work like an FAQ: jumping down to the appropriate entry while remaining in the category, with a link for "top" to take you back up. Check out any category to see what I mean: my blog
kadyellebee
You might see if using this works - in place of MTEntryPermalink in the recent entry code --
CODE
<$MTEntryPermalink archive_type="Category"$>


And then to create a link to the top, add an anchor for the page to go to
CODE
<a name="top"></a>
above the recent entry code. And to make a link, use
CODE
<a href="#top">top</a>


Post back if you have more questions about this smile.gif

Kristine
appleorch
Looks like that changes each title into a link for the whole category, not for the article as displayed in that category.
adamrice
You need to assign an arbitrary ID to the entries in the category. It can be done something like this--we'll use the entry ID as the ID.

In the table of contents section, you want something like this:
CODE
<ul>
<MTEntries>
<li><a href="#entry<MTEntryID>"><MTEntryTitle></a></li>
</MTEntries>
</ul>

In the main-content section, you'd code your titles something like this:
CODE
<h3 id="entry<MTEntryID>"><MTEntryTitle></h3>
appleorch
Works great. Many thanks.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.