Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2008-08-22 09:42:08
- fyankai
- Member
- Registered: 2008-07-07
- Posts: 22
Set article_custom tag to current section (implicitly)
Hi All
Is there a way to basically do this (this obviously doesn’t work because of the nesting):
<txp:article_custom section=”<txp:section />” form=“titleOnly” />
I’ve got a page which I want to use across several sections, and on the individual articles I want to list all other articles in that section. An <txp:article /> tag will just list the current article, and I can’t find a way to limit an <txp:article_custom /> tag to just the current section, without explicitly telling it what section we’re in (eg section=“about”).
Sorry if it’s a dumb question – but have googled quite a bit and can’t figure it out.
Thanks, Frank
Offline
Re: Set article_custom tag to current section (implicitly)
With (upcoming) 4.0.7 you can do:
<txp:article_custom section='<txp:section />' form="titleOnly" />
But currently there is too ways. Plugin called asy_wordertag and php.
<txp:asy_wodertag><txp:article_custom section="<txp:section />" form="titleOnly" /></txp:asy_wodertag>
And the php one:
<txp:php>
echo article_custom(array(
'section' => section(array()),
'form' => 'titleOnly'
));
</txp:php>
Last edited by Gocom (2008-08-22 09:49:44)
Offline
#3 2008-08-22 09:55:56
- fyankai
- Member
- Registered: 2008-07-07
- Posts: 22
Re: Set article_custom tag to current section (implicitly)
Brilliant, thanks so much
Offline