Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2010-01-05 21:51:35
- mnewboult
- New Member
- Registered: 2010-01-05
- Posts: 5
test for default section
I’ve been using txp for a while and keep coming up against this problem. I have 4-5 sections and I’ve made ‘home’ default. I then go to my base url which displays the ‘home’ page but I can’t work out how to test for the default page. The reason I want to do this is because I have a nav bar: ‘home’, ‘blog’…
I want to highlight ‘home’ when I go to the default url by setting the hyperlink to an ‘active’ class and styling it. The only way I can work out how to do this is by clicking on the home link and then it gets the styling but only when the url has …/home in it. I can’t do it for the base url.
I know there are plugins but none seem to sort this and it’s quite frustrating. Any help appreciated.
Offline
#2 2010-01-05 21:54:27
- mnewboult
- New Member
- Registered: 2010-01-05
- Posts: 5
Re: test for default section
Ok I’ve worked it out. I can do…
<txp:if_section name=”“>
To test for the default section.
Offline
Re: test for default section
if_section name="default"
works to.
Offline
Pages: 1