Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
CSS in an Article? Menu problem...
My menu is inside my page template so it applies to all articles, obviously.
my site is 5 static pages.
what i need.. is above the fold every page looks the same.
so i need the menu button that is associated with each article acting as a static “page” to have an active state. i obviously cant apply active states to the css bc itll just do it to all of them. theres only one page/template in textpattern.
so if anybody knows a work around for this sort of problem let me know.. i cant wrap my head around it.
my menu has a down state and an over state. thats it. so when you’re on the contact article i want the contact menu button to be on the over state. but since the contact article is fed into the same page used for every article.. i dont know how to do this. i thought about putting css into the actual article but i dont think you can and that doesnt make much sense.
if somebody can help let me know.
here’s the site:
www.universalfairs.com
Last edited by sparksmemphis (2008-02-21 17:06:57)
www.digitalskraps.com
Offline
#2 2008-02-22 01:04:26
- simsim
- Member
- Registered: 2006-05-06
- Posts: 70
Re: CSS in an Article? Menu problem...
Make a different category name for every menu item, then you could attach the category’s name to the body
element as in ID and target every article’s page in the CSS.
<body id="<txp:category />">
And in the CSS you could have:
#category1 ul li a {
blah: blah;
blah: blah;
}
#category1 ul li a:hover {
blah: blah;
}
#category2 ul li a {
blah: blah;
blah: blah;
}
#category2 ul li a:hover {
blah;
}
And so on..
Offline
Re: CSS in an Article? Menu problem...
so your menu links directly to articles named home, about us, our fairs, etc etc? they’re not sections? a bit odd but i guess it works.
if you used sections you could have used txp:if_section
. if they’re linking directly to articles, then you can use txp:if_article_id
Offline
#4 2008-02-22 02:57:09
- simsim
- Member
- Registered: 2006-05-06
- Posts: 70
Re: CSS in an Article? Menu problem...
Sections would work, but he should change the permanent link mode to “/title” in the preferences tab in order to keep his current URL scheme intact.
Offline