Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
A Large Relaunch with TXP
I’ve been working on this overhaul since July, 2005. It’s a site for a project I co-founded in 2002, The Department of Safety. It’s a multi-disciplinary creative space incorporating an all-ages music venue, 2 recording studios, 2 art studios, an art gallery, a space for DIY workshops, and home to 5-7 people.
I’m pretty pleased with how things turned out. Hopefully I’ll get the mailing list setup soon. Please let me know if you spot any weird layout bugs, I haven’t had access to PC IE lately so I know there’s probably some problems there.
Offline
Re: A Large Relaunch with TXP
Why have you chosen to omit an indication of the active second level navigation item ( Doctrine > Mission | Location | Q & A | History )?
Online
Re: A Large Relaunch with TXP
I actually really wanted do that but couldn’t find a way to show the active article, like making the current article highlight its own name in the second level nav. If anybody has suggestions, I am more than willing to implement that. Thanks for the valuable feedback.
Offline
Re: A Large Relaunch with TXP
The HTML body
element of each article needs an unique id
or class
attribute. An article’s id
comes handy if you wanted to highlight by article (on single article pages), otherwise you would go for the section name <txp:s>
(on list mode pages). Use this class to select some CSS style rules.
In detail:
- Decorate your page template to have unique classes for individual sections, even articles of your site. See here.
- Style it, baby!
bc..#submenu { /* general styling for all navigational items in submenu */
font-weight: normal;
}
body.showcalendar #submenu li#nav-showcalendar, /* styling for nav item when section “showcalendar” is active */
body.56 #submenu li#nav-musical-history, /* styling for nav item when article #56 “musical history” is active */
body.57 #submenu li#nav-foo-bar, /* styling for nav item when article #57 “foo bar” is active */
body.58 #submenu li#nav-john-doe { /* styling for nav item when article #58 “john doe” is active */
font-weight: bold;
}
I have noticed that you have a mixture of one and two levels of depth, so this will add a little confusion on the correct CSS selectors, but this is no show stopper. IMHO.
As I saw no signs of any styling for active nav items in your CSS file, I hth. Sorry if I babbled something obvious.
Robert
Last edited by wet (2006-01-06 07:31:26)
Online
Re: A Large Relaunch with TXP
You are a smart one, Robert. I’ll try and get to this later today. Thanks again for your cogent advice.
Offline
#6 2006-01-05 21:07:12
- kdix
- Member
- From: Texas
- Registered: 2005-12-09
- Posts: 11
Re: A Large Relaunch with TXP
I think it looks fantastic! Great job on the design and implementation with TXP.
Offline
Re: A Large Relaunch with TXP
> The Safety Inspector wrote:
You are a smart one, Robert.
One gets smarter every day. Real life shows that my idea was a little bit too short sighted as an article’s id is not available until the first instance of txp:article
is processed on a page. So I have refined the page template sample to take that into account.
- First, you will need a new article form which I named
article-id
for the sake of clarity. This form contains at least a call totxp:article_id
, plus any text which will define the class name for the body elements later on:foo-<txp:article_id />
article-<txp:article_id />
- ad lib…
- Second, use this in your page template. See here.
Phew… Rather crude solution with lots of ugly nested tags ;-) As long as it serves its purpose, I’m fine with it.
Last edited by wet (2006-01-06 19:27:54)
Online
Re: A Large Relaunch with TXP
Robert-
Thank you for all of your advice. The site now has an “active” state for the submenu tabs. Looks so much better!
Offline
Re: A Large Relaunch with TXP
I have been hearing about the Department of Safety for a while now. It always seemed like really cool, positive space. I will try and make it down one of these days. Are you guys having the mini festival again this summer?
The site looks good too!
Last edited by Jeff_K (2006-01-06 18:52:46)
Offline
Pages: 1