Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2007-09-13 13:27:40
- Qwest
- Member
- From: London, UK
- Registered: 2007-01-24
- Posts: 112
txp:article_custom for 2 sections?
Hello!
I’m building a site at the moment, and I’m using TXP to power it. It’s a website for an artist agency which promotes DJ’s & MC’s.
I’ve got 2 sections, one for Dj’s & one for MC’s. (dj
and mc
On the front page, i’ve got a section to advertise the latest artist (either DJ or MC) added to the roster. Now i assumed i could use the following to display it: <txp:article_custom section="dj,mc" form="headline" limit="1" />
But that doesn’t appear to work. I get nothing… Can i use the section=""
to call multiple sections? If not, how do i go about it?
Offline
Re: txp:article_custom for 2 sections?
No, it doesn’t allow to call multiple sections as you see. There is couple of ways to do what you want. First one without any plugins.
The article_custom on the frontpage:
<txp:article_custom form="headline" limit="1" />
And surround in article-form, headline, content with:
<txp:if_article_section name="dj,mc"></txp:if_article_section>
Cheers!
Last edited by Gocom (2007-09-13 13:45:50)
Offline
#3 2007-09-13 14:14:34
- Qwest
- Member
- From: London, UK
- Registered: 2007-01-24
- Posts: 112
Re: txp:article_custom for 2 sections?
Gocom, thanks, but i’m getting this error:
tag_error <txp:if_article_section name="dj,mc"> -> Textpattern Notice: Article tags cannot be used outside an article context on line 1887
any ideas?
Offline
#4 2007-09-13 16:27:52
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: txp:article_custom for 2 sections?
Use this: <txp:if_article_section name="dj,mc"></txp:if_article_section>
in your article form (just wrap it around it’s entire content).
BTW, you only need this as a temporary solution :)
Offline
Offline
Pages: 1