Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
[SOLVED] Get article titles to appear under a section template?
Can I get article titles to appear under a particular section template? (I’m working on this on my local install)
Something like
<txp:if_article_list>
<txp:if_section name="sec1">
<txp:if_category name='<txp:category />'>
<txp:article_custom section="sec1" category='<txp:category />' limit ="5" />
<txp:else />
<txp:article_custom section="sec1" limit ="500" />
</txp:if_category>
</txp:if_section>
<txp:if_section name="sec2">
...
</txp:if_article_list>
…
I tried the above but it augments (non dynamic) content from the default section.
Any idea why?
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: [SOLVED] Get article titles to appear under a section template?
Yiannis, can you please explain what you are after and possibly post your full tag trace? What does “section template”, “non dynamic” and “from the default section” mean? Default section doesn’t have any content at all, which makes me wonder where from comes to play. I seriously have no idea what you are trying to do, and the code doesn’t really make sense to me with the category condition that does a lot nothing in that context.
Offline
#3 2011-07-07 15:55:20
- GugUser
- Member
- From: Quito (Ecuador)
- Registered: 2007-12-16
- Posts: 1,477
Re: [SOLVED] Get article titles to appear under a section template?
And you have to set <txp:title />
at the desired place.
Offline
Re: [SOLVED] Get article titles to appear under a section template?
why use txp:article_custom!! you have a test about section and categoyr, you can use directly txp:article! no?
Offline
Re: [SOLVED] Get article titles to appear under a section template?
Hi Guys
Solved:) and uploaded. Sometimes posting in this forum just kick starts me:)
Jukka, I was trying to implement your suggestion re authors in categories. As I only have one template which I have conditionals for the sections, I had to do some acrobatics to figure it out:)
All authors here now have their own categories whereas the linked list is generated automatically every time we add an author. My next step will be to have the link go to the text when we just have one text submitted but this will be harder… Or maybe not if I use a variable:)… I can’t even start thinking properly about it just now:)
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: [SOLVED] Get article titles to appear under a section template?
@Rabah
You are right… Is there a problem with article_custom though? Maybe in terms of memory or resources usage?
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: [SOLVED] Get article titles to appear under a section template?
Hi Yiannis
Maybe yes (i think a dev can answer that question better than me) but the code is easier with txp:article, and you will not be warn on test mode about not having a txp:article in your page.
Offline
Offline