Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2008-09-27 23:09:20
- Distrahera
- Member
- Registered: 2008-09-20
- Posts: 30
Clean URL's
Hi!
I have an issue on my site where I use clean URL’s. The clean URL’s works properly but not entirely for my defaultpage and for my links.
Lets say I have two sections on my site, Home and News. I want Home to have this URL:
www.mysite.com/
And I want the News section to have this URL:
www.mysite.com/news/
www.mysite.com/news/?pg=2 (for example)
========================
The problem is, when I create my “News” link, I need to use this url to link me correctly:
<a href=”<txp:site_url />index.php?s=News”>News</a>
Instead of the desired:
<a href=”<txp:site_url />news”>News</a>
Giving me the nice url: www.mysite.com/news/
========================
Perhaps im writing my markup incorrectly or in the wrong place. im currently only using the default page for all my sections, like this:
========================
<txp:if_section name=“News”>
<txp:article form=“articleFull” limit=“3” pageby=“3” listform=“articleList” sort=“Posted desc” time=“any” />
<txp:older>Next 3</txp:older>
<txp:newer>Previous 3</txp:newer>
</txp:if_section>
========================
With this in the default page, the newer and older links wont lead me to older/newer news articles, since its the wrong url.
My site is www.foxforcefive.net if anyone wants to view my issue online. Thanks, eveyone.
Last edited by Distrahera (2008-09-27 23:13:46)
Offline
#2 2008-09-28 00:01:04
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Clean URL's
This individual article page displays fine, so clean URLs definitely work. You will also notice a difference between your pages /index.php?s=news and /index.php?s=News.
Start with changing your section names, as well as instances of section names in tag attributes (name="News"
) to all lowercase. (Always avoid capitals in elements of your site that end up in the URL.)
Offline
#3 2008-09-28 00:18:18
- Distrahera
- Member
- Registered: 2008-09-20
- Posts: 30
Re: Clean URL's
Thank you!
God, i’ve been trying to wrap my head around this for way to long. Can’t believe I used capitals in section names and thats what caused the problem. Sometimes you just think of the long way around and cant see the easier fix.
URL issue is now solved, time to focus on other things.
Thanks alot (!)
Last edited by Distrahera (2008-09-28 00:35:48)
Offline
Pages: 1