Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#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

#2 2008-08-22 09:48:52

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

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

Board footer

Powered by FluxBB