Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2011-01-05 17:10:24

kvnmcwebn
Member
From: Ireland
Registered: 2007-01-27
Posts: 724
Website

if section question

hi,
I am modifying an install of the widescreen photoblog template and have come across something i can’t figure out. I didn’t ask under the templates thread because it’s been inactive for a couple years.

Anyway here’s the problem. In the archive section of the blog the body id changes depending if your on the landing page or on an individual article. But for me it’s not working. The body id stays at “archive” even if you’re on an individual article. Is there any reason the code below wouldn’t be working. I’m just trying to trouble shoot this.

Here’s the code:

<txp:if_section name="ireland-photographs">
......
</head>
<body id="archive">
<txp:else />
<txp:if_individual_article>
.........
</head>
<body id="archivedentry">
</txp:if_individual_article>
<txp:if_article_list>
<txp:output_form form="doc-head-a" />
.......
</head>
<body id="archive">
</txp:if_article_list>
</txp:if_section>

here’s the url to the archive landing page:
archive

and here’s a example of an individual article:
archive

by viewing the source you can see that the body id’s don’t change…

thanks for reading
-kevin


its a bad hen that wont scratch itself.
photogallery

Offline

#2 2011-01-05 17:34:54

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: if section question

Both the links you posted are in the “ireland-photographs” section. So the if_section tag evaluates true, and the if_individual_article check never happens.


Code is topiary

Offline

#3 2011-01-05 17:39:25

kvnmcwebn
Member
From: Ireland
Registered: 2007-01-27
Posts: 724
Website

Re: if section question

oh. wouldn’t the if individual article still get triggered as well?
thanks for the quick response jeff.

edited to say…
wait i think i understand what you’re saying..

Last edited by kvnmcwebn (2011-01-05 17:42:51)


its a bad hen that wont scratch itself.
photogallery

Offline

Board footer

Powered by FluxBB