Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Selecting a
OK, this is perhaps a touch complex and hackish for my first query, but I’m trying to port an existing site over to TextPattern so I need to try and make this work. All help is hugely appreciated.
On my front page, I have an article list for a section named ‘News’. I also have sticky items in the ‘News’ section at the top of the same list.
Also on the front page I have a single piece of content which, in the semantics of TextPattern, is from a different section (‘Gigs’). I only want one single article from it, and it makes most sense for that article to be identified by ‘Sticky’ status.
The non-TxP version of the site is http://resintheband.com. Mapping its content to TextPattern: The news items are in the main front-page section (‘News’), the ‘Welcome to…’ article is also in ‘News’, but is marked as Sticky. In my TxP porting, this part works fine.
Now, at the top is the ‘Next Gig’ ticket, and it’s this content that would come from the separate ‘Gigs’ section. I’d like for the site owner to be able to enter as many upcoming gigs as he likes into this ‘Gigs’ section, but to manually indicate the article to display by marking one single article in the ‘Gigs’ section as ‘Sticky’.
…And breathe.
I really hope that makes some kind of sense.
I’ve read up on techniques for including specific article content, but that seems reliant of having one specific article targeted and calling it in using the ID number. This is more a case of specifying a specific section and sticky status and returning a single non-specific article.
Thanks very, very much for your help. I’m new to TextPattern and having spent quite a while finding the XML templating rather ‘weird’, I am starting to get to grips with it.
Offline
Re: Selecting a
I believe you could use <code><txp:article_custom status=“sticky” section=“SectionName” /></code> however I’m a little doubtful about whether you can have 2 stickies on the same page so how about <code><txp:article_custom id=“123” /></code> instead.
Last edited by thebombsite (2005-10-04 05:21:46)
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
#3 2005-10-04 12:40:33
- zem
- Developer Emeritus
- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: Selecting a
I’m a little doubtful about whether you can have 2 stickies on the same page
You can, they’re just regular articles with a different status (5 instead of 4).
Alex
Offline
Re: Selecting a
Thanks for the info zem. I don’t know why I was thinking that. I can’t find any reference to it. Maybe it’s because I thought it only worked with the <code><txp:article /></code> tag. :(
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
Re: Selecting a
Thank you very very much, especially ‘thebombsite’ as you code worked exactly as desired.
Offline
Re: Selecting a
You’re welcome. :)
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
Pages: 1