Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-07-29 08:27:42

tye
Member
From: Pottsville, NSW
Registered: 2005-07-06
Posts: 859
Website

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

#2 2007-07-29 11:40:13

tye
Member
From: Pottsville, NSW
Registered: 2005-07-06
Posts: 859
Website

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

#3 2007-07-29 13:39:36

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

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

#5 2007-07-29 14:09:17

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

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

#7 2007-07-29 14:29:21

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

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

#8 2007-07-30 01:33:37

tye
Member
From: Pottsville, NSW
Registered: 2005-07-06
Posts: 859
Website

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

Board footer

Powered by FluxBB