This forum is for assistance with theme development.

Marking a top-level menu as active when on a sub-page

This is a big usability issue that's been haunting us for months: how do you get a top-level menu item to stay active when you've navigated to a page within that section?

On a top level (L1) page, we have no problem getting the top-most menu to have a CSS class of active, when you're on the page.

If you navigate to another page within that section, we'd like to keep the "active" class on the L1 page. We've written the following function for template.php that's great for highlighting the child items, but we're stumped as to how to get the parent item to also have an "active" CSS class.


/** add images to menu titles, and adds special characters to active menu items **/
function phptemplate_menu_item_link($item, $link_item) {
if( strpos($item['title'], 'Only local images are allowed. return l($item['title'], $link_item['path'], !empty($item['description']) ? array('title' => $item['description']) : array(), NULL, NULL, FALSE, TRUE);
}
$this_page = menu_get_active_title();
if ($item['title'] == $this_page || drupal_is_front_page() && $item['title'] == "Home" || $active) {
return "". $item['title'] ." ›

\n";
}
else {

Authoring Information

How do I take this out on the page? it shows up on every product page...

Resize Tips Table in my own Template

Hey Guys, I am currently working on a website with Drupal installed on the site for the blogs section. We went ahead and used the same layout and design to our website as the template for the drupal system. A problem I ran into was that there is a page with tips on how to incorporate HTML code into user comments correctly. This table that this information is in, is too wide for the body area of our website. I tried searching into the CSS to see if I can adjust the width but couldn't find it. I've found other css tags that did affect the style but not the width.

I cant fugure out where this space is coming from

Im a big time novice at this stuff and have been changing SEO position by trial and error.

On our site www.madebysurvivors.com

on the main page, under each story (first one is News and Upcoming Events) there is a big space before the next story. When I look in firebug I cant see any padding or anything creating it. Ive tried changing everything in style.css but I cant get that space out.

Thanks in advance

Changing font size in style.css narrows center region

Since the body text in the center region takes up to much visual space I figured I could downsize the font which I did in style.css (I'm using the Aberdeen theme). Maybe there is a better way (?) than hardcoding the font size (which the theme already did) but that's what I did.

What happened, apart from the font size change was that the center region with the text now has invaded the left sidebar. How could this be - I thought the regional width parameters hardcoded the width disregarding font size?

Any tips for a frustrated newbie? :)

/PWG

Help with banner positioning on main page

Hi, I am trying to get the picture banner on test.chezjjp.com to be positioned to the right of the "ChezJJP.com" and above the gray line. Would this be a css matter? If so, how would I go about this? (The theme I am using is "scribbish")

I am very new at Drupal and am starting to love it, but would appreciate any help! Thanks so much,

ChezJJP

Pages

Subscribe with RSS Subscribe to RSS - Theme development