Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2012-05-07 12:33:57
- newto
- New Member
- Registered: 2012-05-07
- Posts: 1
jump menu
Hi
I’m new to textpattern.
The site that I wish to make has a simple design that consist of only one jump menu as navigation.
This jump menu contains links to articles and is fixed on every page. Every time I write a new article in textpattern, the title should appear in the jump menu. I would like to know if there’s a way to make a jump menu that automatically updates when I post a new article?
I’m possible fairly vague, but it would be a great help if someone could lead me in the right direction, or give me some advice, on how to do this.
Thanks
k
Netherlands
Offline
Re: jump menu
Hi k,
you can use txp:article or txp:article custom twice in a page template, so if you have a page template that is just an article list and has no individual article urls, you can do something like this simplifed example:
<!-- jump menu at top of page -->
<txp:article limit="99" wraptag="ul" break="li">
<a href="#<txp:article_url_title />"><txp:title /></a>
</txp:article>
...
<!-- article list -->
<txp:article limit="99">
<article id="<txp:article_url_title />">
<h1><txp:title /></h1>
<txp:body />
</article>
</txp:article>
Embellish as required :-)
Last edited by jakob (2012-05-07 12:40:52)
TXP Builders – finely-crafted code, design and txp
Online
Pages: 1