Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2006-03-21 04:27:23
- jessejericho
- Member
- Registered: 2005-10-29
- Posts: 25
List excerpts of articles from another section?
Hello, I have 4 sections in my site:
Restaurant 1
Restaurant 2
Restaurant 3
Events
I want to be able to list the excerpts of some articles from the Events section on an article within one of the Restaurant sections – I have been racking my brain trying to figure out how to do this, trying different combinations of article_custom, with category and section modifiers… but I can’t seem to figure it out. Any suggestions?
Thanks,
Jesse
Offline
#2 2006-03-21 04:35:22
- zem
- Developer Emeritus
- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Offline
Re: List excerpts of articles from another section?
To clarify a bit…
First: read the link posted by zem.
Option A
1. in the page template asociated with “one of the Restaurante sections”, put something like:
<txp:article_custom form="justexcerpt" section="Events" excerpted="y" />
Wrap it in <txp:if_section name="restaurante1"></txp:if_section>
if you need it.
2. create an article form and name it “justexcerpt”. Inside, put:
<txp:excerpt />
That’s all. Play with the rest of article_custom attributes (limits, offset, etc)
Option B
1. 1. in the page template asociated with “one of the Restaurante sections”, put something like:
<txp:article_custom form="justexcerpt" section="Events" />
Wrap it in <txp:if_section name="restaurante1"></txp:if_section>
if you need it.
2. 2. create an article form and name it “justexcerpt”. Inside, put:
<txp:if_excerpt><txp:excerpt /></txp:if_excerpt>
Option C
1. find it yourself
2. please, come back and share it here, or better, in this forum
@*zem* (or any other txp genius out there… well… you know how you are…)
I find very “rare” that excerpted="y"
attribute!
Is it for backward compatibility?
Because I found that the similar things are achievable with <txp:if_excerpt></txp:if_excerpt>
Or is there an unknown power behind that excerpted
attribute?
Thanks in advance for the illumination
Offline
#4 2006-03-21 05:26:45
- zem
- Developer Emeritus
- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: List excerpts of articles from another section?
excerpted
excludes articles with an empty excerpt from the list. It doesn’t control how they’re displayed.
Alex
Offline
Re: List excerpts of articles from another section?
thanks, zem! now i understand a bit more, but …still trying to make my head around that attribute, hoping his unknow power will be revealed to me…
Offline
#6 2006-03-21 06:11:38
- zem
- Developer Emeritus
- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: List excerpts of articles from another section?
FYI, I added the original question to the Common HDI FAQ.
Alex
Offline