Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2012-03-05 20:23:49

iamtheratio
New Member
Registered: 2012-03-05
Posts: 4

Permalink's are not working, can't figure out why.. Help?

Hey guys,
I just signed up for an account here today to post this question because I’m exhausted from trying to figure out what’s going on. It may be something extremely minor, but I figured I’d ask and hopefully someone can help me out!

I created a site, http://www.autumnandcolour.com using TextPattern and for some reason when I create the permalink for the news articles, when clicked they just reload the default page.

Here’s an example:
Main Page – http://www.autumnandcolour.com
Archive Page – http://www.autumnandcolour.com/archive
Example Permalink – http://autumnandcolour.com/news/14/los-angeles-ca-shows

The example permalink should load that article only, but it doesn’t, it just reloads the default page. Any help here would be greatly appreciated. I also copied over the .htaccess file from another textpattern site i created where the permalinks actually worked fine and that still didn’t resolve the problem.

Thanks in advance!

-George

Offline

#2 2012-03-05 20:39:50

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Permalink's are not working, can't figure out why.. Help?

Hi George, I assume you set the section ‘news’ to use the default page template? Can you post the code on that page? It’s probably just a missing txp:article tag or conditional tag.

Offline

#3 2012-03-05 21:28:38

iamtheratio
New Member
Registered: 2012-03-05
Posts: 4

Re: Permalink's are not working, can't figure out why.. Help?

Els: No problem, here’s the article code from the default page that pulls the news articles up.

<txp:article_custom category=“news” form=“default” limit=“2” section=“news” sort=“Posted desc” status=“4” />

Offline

#4 2012-03-05 22:30:43

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Permalink's are not working, can't figure out why.. Help?

To display individual articles you need <txp:article />. You can change that line to:

<txp:if_article_list>
   <txp:article_custom category="news" form="default" limit="2" section="news" sort="Posted desc" status="4" />
<txp:else />
   <txp:article />
</txp:if_article_list>

<txp:article /> is context sensitive, so – used like this – it will only display the individual article that is requested. Therefore you don’t need most of the attributes, just the form attribute if your single article form is something else than ‘default’.

Offline

#5 2012-03-05 22:43:18

iamtheratio
New Member
Registered: 2012-03-05
Posts: 4

Re: Permalink's are not working, can't figure out why.. Help?

That did the trick, I knew it was something little that I just didn’t know.

I really appreciate the help! :)

Offline

Board footer

Powered by FluxBB