Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-09-18 02:57:47

plummerm
Archived Plugin Author
Registered: 2006-06-19
Posts: 22

Accessing article ID in section pages

Hello,
First, I apologize if I am duplicating someone’s question. I haven’t been able to find anything, though.
I am using Textpattern for a CMS and I have a problem.

In my setup, I have each Section page displaying only one page at a time (with a limit=“1” in the article tag). If I specified a GET article ID, I can easily find the Article ID by using the global $pretext. However, when I use just the section page, although there is only one article displayed, $pretext doesn’t function because it isn’t in an actual article template.

Honestly, the main reason I have it set up this way is so I can have clean URLs like /newspapers/, /websites/, /magazines/ and still have other articles listed with normal URLs in each section/directory.

Is there any way to easily obtain the article ID from the section page, or am I completely barking up the wrong tree?

thanks for your time,
Matt

Offline

#2 2006-09-18 03:15:33

rsilletti
Moderator
From: Spokane WA
Registered: 2004-04-28
Posts: 707

Re: Accessing article ID in section pages

Even if you are only displaying one article, if you call a section by name without an article ID, TXP is displaying an article list, with page statistics, rather than an individual arictle. Article statistics are generated in the article form but not the page template. I’ve seen some navigation schemes use information from within the article form to style bars set in the article form sensitive to the displayed article, but the page template is out of reach.

Offline

Board footer

Powered by FluxBB