Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2006-06-22 14:14:48
- WhiteDog
- Member

- From: Maine
- Registered: 2005-09-07
- Posts: 174
Article titles as navigation?
First I apologize if this has been covered before, after I did a search and checked the FAQ and textbook I still could not find what I wanted to do. With that having been said here is what I am trying to do.
I want to set article titles as an updateable side nav. So instead of the articles filling the body of the page it would just be a title on the side. But when an article was selected it would keep the nav and then load the article body and title in the maine content section of a new page. In the attempts I have tried to do this I ended up breaking TXp and getting php error messages. but when it does load a linked page the styling is completely broken, and I can’t find what it is calling for an individual article page.
I hope that made sense. Thanks in advance
Grrr RRR nnndth grrr Skeek!
Offline
Re: Article titles as navigation?
The only way I can envision doing this, if you’re attached to not loading a new page, is to use frames. I’m not sure Textpattern supports using them, however. Perhaps one of the gurus can weigh in?
Offline
#3 2006-06-22 15:08:22
- WhiteDog
- Member

- From: Maine
- Registered: 2005-09-07
- Posts: 174
Re: Article titles as navigation?
no i will gladly load a new page that is not a porblem
Grrr RRR nnndth grrr Skeek!
Offline
Re: Article titles as navigation?
So, you just want a list of navigation links displayed globally on your site in a div? Something like “links to the five most recent articles” or something displayed on every single page?
Offline
#5 2006-06-22 15:25:46
- WhiteDog
- Member

- From: Maine
- Registered: 2005-09-07
- Posts: 174
Re: Article titles as navigation?
I want the links on every page in a div but when a new article is added it adds to the nav, the txp:recent_articles tag does something similar to what I am looking to do but I don’t want teh articles themselves to show up on a main page Only when clicked does it show an individual article.
I have a feeling it is really simple. I guess basically i want it to operate like a standard site nav but adding articles will add to the nav.
Thanks
Last edited by WhiteDog (2006-06-22 15:26:54)
Grrr RRR nnndth grrr Skeek!
Offline
Re: Article titles as navigation?
There’s no reason that you couldn’t easily achieve this using a form that you call globally. Maybe something like:
<code><txp:permlink><txp:title /></txp:permlink><br /></code>
Offline
Re: Article titles as navigation?
hi Perro Blanco (that is “white dog” in spanish)
You will probably need some kind of vertical list
1. create an article form with just a <li><txp:permlink><txp:title /></txp:permlink></li> inside. Save it an name it “linked_title” (or whatever you want).
2. Then, in your page template, add:
<code><ul>
<txp:article form=“linked_title” />
</ul>
</code>
And if I’m not missing something, that’s all.
edit: Elenita types less and faster.
Last edited by maniqui (2006-06-22 15:57:38)
Offline
Re: Article titles as navigation?
But Julián is clearer. :)
The only thing that concerns me is that it’s possible for White Dog to have <code><txp:article /></code> tags in his (her?) pages. That’s not bad exactly, but might cause conflicts with pagination, if I remember right.
Maybe the recent articles tag (with a limit of 9999 or something) is the way to go?
Offline
#9 2006-06-22 16:54:45
- WhiteDog
- Member

- From: Maine
- Registered: 2005-09-07
- Posts: 174
Re: Article titles as navigation?
Thank you both very much for your help.
After implementing your ideas I did indeed get The nav to be set as titles but the article body to all the articles is trailed in the content area, and when you click a specific article title it loads a page with just the article selected and the rest of the nav disappears.
Any thoughts on what i am doing wrong?
Thanks again for all your help
Grrr RRR nnndth grrr Skeek!
Offline
Re: Article titles as navigation?
mmmm, that’s because <txp:article /> is context-sensitive. It means that when in individual-article context (that’s: when you click on an article title on your nav), all the <txp:article /> calls to variables from the current (individual) article and that’s why all your nav (but the current article link) disappears.
Try changing <txp:article /> to <txp:article_custom />. The last one isn’t context-sensitive, but you will need more “tuning” on this one, because it picks information of articles from all sections.
There is very good information in the FAQs about difference between article and article custom.
Offline
#11 2006-06-22 17:08:43
- WhiteDog
- Member

- From: Maine
- Registered: 2005-09-07
- Posts: 174
Re: Article titles as navigation?
Great I will check that out. Thanks Again!
Grrr RRR nnndth grrr Skeek!
Offline
Pages: 1