Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Keeping related navigation with related article
OK – I’m thinking out loud here…
I am putting a magazine into TXP and have come stuck on a problem.
At the moment I am creating a section for each new issue.
For each issue I have a sub nav on the right hand side which includes a picture of the cover and a list of articles. Obviously this changes each issue. When a new issue is created – I create a new section and change the list of articles to pull from that section.
So I have a few questions:
1 – How can I get the image to dynamically change with each issue – possibly image categories?
2 – How can I get past issue articles to display using the correct sub nav on the right hand side).
Offline
Re: Keeping related navigation with related article
nm… just been doing some reading and think this could be possible with <txp:if_category />
Could I split the issues into categories… I have never really used categories for articles before – I’ll have a go tomorrow
Offline
Re: Keeping related navigation with related article
If you are using a separate section for each issue couldn’t you use <txp:if_section></txp:if_section>
instead? That would work for both your cover image and sub-nav as well.
Last edited by thebombsite (2007-07-29 13:40:31)
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
#4 2007-07-29 13:58:53
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Keeping related navigation with related article
Or you might name the images like the sections, so if you have sections like ‘issue-1’, ‘issue-2’, etcetera, your images will be ‘issue-1.jpg’, ‘issue-2.jpg’. Call the images with <img src="images/<txp:section />.jpg" />
.
Offline
Re: Keeping related navigation with related article
Nice idea Els. :)
Would that also work with the form output tag? As a different sub-nav is required for each issue could forms be created (including the appropriate cover image) with the same names as the sections and then call the form using <txp:output_form form="<txp:section />" />
??
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
#6 2007-07-29 14:18:23
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Keeping related navigation with related article
Sure, but you’ll have to use asy_wondertag for that :)
EDIT: But I’m not sure if this is the right way to go. You’d end up with an infinite number of sections and forms…
Last edited by els (2007-07-29 14:24:12)
Offline
Re: Keeping related navigation with related article
Correct, but if a different sub-nav is required for each section it would be better than having a mile-long sidebar form full of “ifs”. Certainly easier to modify if need be.
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
Re: Keeping related navigation with related article
Awesome info here – thanks guys :)
I had already resigned myself to having lots of either forms, sections or if statements… but these answers look great – I’m going to test them now.
What’s annoying though is that I have used lots of if section statements before – so I should have been able to work this out myself!
Offline