Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
indi_article list?
Its late, I’m stumped.
I need to output a list of articles that all share the same article category from within an individual article.
I tried <code>
<txp:if_article_category name=“this-week”>
<txp:article_custom section=“events” category=“this-week” />
</txp:if_article_category>
</code>
But no go :(
Its under my nose isn’t it .
Thx,
Matthew
- I am Squared Eye and I
am launchinghave launched Pattern Tap
Offline
Re: indi_article list?
The default limit claims to be 10, but have you tried setting your limit? Is this perhaps accidently encased in a <code><txp:if_individual_article></code> ?
Last edited by textpress (2006-04-19 05:50:19)
Offline
#3 2006-04-19 06:00:07
- whatbrick
- Member
- From: Texas
- Registered: 2006-03-13
- Posts: 100
Re: indi_article list?
Is this not something that could be done with related_articles?
When I wanted to create a list of articles that was related by a category from within another article (and called from a link within that article), I used something like this:
<a href="<txp:site_url /><txp:section />/?c=<txp:category1 />"><txp:category1 title="1" /></a>
I used that in my default article form. All it’s doing is customizing my own <txp:category1 link="y" />
tag.
I’m not sure if this is what you’re asking but that’s my limited understanding. I may be missing what you are trying to accomplish.
Do not taunt the Markup Monkey!
Offline
Re: indi_article list?
figured it out
first:
call a normal article with a special form (events)
<code>
<txp:if_section name=“events”>
<txp:article form=“events” />
</txp:if_section>
</code>
Then make your events form look like this:
Form=“events”
<code>
<txp:if_article_category name=“this-week” number=“1”>
<txp:article_custom section=“events” category=“this-week” limit=“10” />
</txp:if_article_category>
<txp:if_article_category name=“next-week” number=“1”>
<txp:article_custom section=“events” category=“next-week” limit=“10” />
</txp:if_article_category>
<txp:if_article_category name=“upcoming-weeks” number=“1”>
<txp:article_custom section=“events” category=“upcoming-weeks” limit=“10” />
</txp:if_article_category>
</code>
Then jump up and down like a monkey.
Note that the if_article category tags only worked inside an article form. DUH. Shoulda realized that one. So I doubled up on my articles, and viola, I get an article list (based on whatever kind of form you want – links or excerpts or full articles) that accompanies the individual article that is called via a link.
In my case that link looks like this:
<code>
<a href=”<txp:permlink />”><txp:category1 title=“1” /></a>
</code>
This is part of a nav menu, so that instead of a list of titles for the section of events being displayed in my nav menu, I have a list of categories, that takes a person to the most recent individual article page instead of a /section/?c=category page. For this site, that was preferred.
You can see the example at my testbed (click this week) or when it goes live, it will be here
Thanks for your help,
Matthew
Last edited by ma_smith (2006-04-19 13:48:04)
- I am Squared Eye and I
am launchinghave launched Pattern Tap
Offline
Pages: 1