Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Wildcard sections in Section List?
OK – so when making a section list I want 2 sections to appear 1 & 2, then the rest to appear in whichever order they come in.
I am sure I have seen a section wildcard like this ‘*’:
<txp:section_list sections="section1, section2, *"
Was I dreaming?
Sorry – I haven’t had time to test this – on the run
Offline
Re: Wildcard sections in Section List?
Yes, you were dreaming.
Offline
Re: Wildcard sections in Section List?
Ha Ha – thought so :)
Offline
Re: Wildcard sections in Section List?
nm… this is confusing me now… how can I do this?
I have 4 sections which must be in an certain order, and the others must follow on after.
At the moment I have: asection, bsection, csection, dsection etc… but when using clean urls – it obviously falls down.
These are the column names in the section table: name, page, css, is_default, in_rss, on_frontpage, searchable, title
Offline
Re: Wildcard sections in Section List?
Hi Tye,
Maybe one the sections plugins will help
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: Wildcard sections in Section List?
Thanks Colak – I’ll look at those later, because I actually re-did the site to use <txp:if_category> -but I can’t get that to work neither :((((
The following works fine for all the categories except for “Contact and About” which have a conditional tag around them – they output 2 article forms, presumably from the first article call and then the article call within the conditional tag.
I can remove the article tag from Contact – and thats fine – but the About uses a totally different layout and is just not working
Is there something I am missing?
<txp:if_category name="">
<txp:article limit="1" form="cs-article" />
</txp:if_category>
<txp:if_category name="Contact">
<txp:article limit="1" form="cs-article" />
<txp:output_form form="cs-contact" />
</txp:if_category>
<txp:if_category name="About">
<txp:article form="cs-about" limit="1" sort="posted asc" />
</txp:if_category>
Offline
Re: Wildcard sections in Section List?
I think that the reason they output is indeed because of <txp:if_category name="">
.
Another – simpler way is to forget, calling the forms in your tags and use the “Override forms” in the write tab.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
#8 2008-05-06 09:04:57
- redbot
- Plugin Author
- Registered: 2006-02-14
- Posts: 1,410
Re: Wildcard sections in Section List?
Try this:
<txp:if_category name="Contact, About">
<txp:else />
<txp:article limit="1" form="cs-article" />
</txp:if_category>
<txp:if_category name="Contact">
<txp:article limit="1" form="cs-article" />
<txp:output_form form="cs-contact" />
</txp:if_category>
<txp:if_category name="About">
<txp:article form="cs-about" limit="1" sort="posted asc" />
</txp:if_category>
Offline
Re: Wildcard sections in Section List?
Wow:)
Thanks colak – I had totally removed form override from my memory after a bad experience and it would have worked in this situation, if it hadn’t have been for the sort=”“ which I needed… still good to remember to use in similar situations though.
redbot thank you, I didn’t even know you could use conditionals like that, it never even crossed my mind :)
Offline
Pages: 1