Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2007-11-16 23:03:06
- babyben
- Member
- Registered: 2007-06-03
- Posts: 39
Recent Article in current section
I’m using the recent articles tag to produce a sidebar menu on my site, is there a way to get the tag to out the recent articles ‘from the current section’ automatically, rather than have to tell it which section I want to output?
<txp:recent_articles break=“li” label=”“ section=“widgets” sort=“Title asc” wraptag=“ul” />
to something like
<txp:recent_articles break=“li” label=”“ section= current sort=“Title asc” wraptag=“ul” />
Hope that makes sense!
Offline
Re: Recent Article in current section
<txp:php>
echo recent_articles (array(
'break' => 'li',
'label' => '',
'section' => $GLOBALS['s'],
'sort' => 'Title asc',
'wraptag' => 'ul',
));
</txp:php>
Offline
#3 2007-11-17 01:38:58
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Recent Article in current section
Offline
#4 2007-11-17 11:49:12
- babyben
- Member
- Registered: 2007-06-03
- Posts: 39
Re: Recent Article in current section
Jim – your a star, works perfectly – exactly what I was looking for.
Thank you!
Last edited by babyben (2007-11-17 11:49:29)
Offline
#5 2007-11-17 18:30:36
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Recent Article in current section
Another one:
<txp:asy_wondertag><txp:recent_articles break="li" label="" section="<txp:section />" sort="Title asc" wraptag="ul" /></txp:asy_wondertag>
Offline
Pages: 1