Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2008-02-17 00:27:31
- WhiteDog
- Member
- From: Maine
- Registered: 2005-09-07
- Posts: 174
The trouble with article lists
Hi there I just discovered the amazing thing that is an article list. But, I am having a problem. The code I have is
<txp:if_article_list><txp:article form=“default” category=“news” limit=“1” /></txp:if_article_list>
<txp:article listform=“article_listing” limit=“21” sort=“Posted asc” category=“news” />
<txp:if_individual_article>
<ul class=“post”>
<li><txp:link_to_prev>previous</txp:link_to_prev></li>
<txp:article form=“news-list” limit=“21” sort=“Posted asc” category=“news” />
<li><txp:link_to_next>next</txp:link_to_next></li>
</ul>
</txp:if_individual_article>
When you land on the page it displays the most recent article and the list of articles below it. The problem I am having is I can’t figure out for the life of me how to keep the list of articles on screen once you actually click on one. The list will just disappear and in the case of my most recent attempt it adds much unneeded tags and code.
All I am trying to do is keep the list of articles from disappearing when you go to read a specific one.
Thanks for your help in advance
Grrr RRR nnndth grrr Skeek!
Offline
Re: The trouble with article lists
<txp:article />
is context-sensitive, meaning when you click on an article permlink your code will no longer output the list, even though you are giving a listform
.
<txp:article_custom />
is not context sensitive, and always outputs a list. Use that for your list.
Also, you don’t need to specify form="default"
.
Code is topiary
Offline
#3 2008-02-17 01:16:31
- WhiteDog
- Member
- From: Maine
- Registered: 2005-09-07
- Posts: 174
Re: The trouble with article lists
Thank You So Much!!!
Grrr RRR nnndth grrr Skeek!
Offline
Re: The trouble with article lists
Note, however, that if you want to be able to use that page for search results or category lists, you’ll need some more code.
Code is topiary
Offline
#5 2008-02-17 16:33:44
- WhiteDog
- Member
- From: Maine
- Registered: 2005-09-07
- Posts: 174
Re: The trouble with article lists
thanks!
Grrr RRR nnndth grrr Skeek!
Offline
Pages: 1