Closed (fixed)
Project:
Genesis
Version:
6.x-2.4
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
25 Aug 2009 at 22:08 UTC
Updated:
9 Sep 2009 at 01:30 UTC
Jump to comment: Most recent file
How can I make the left sidebar maintain a fixed width even if no block is being displayed? Thanks.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | MG Design.jpg | 258.01 KB | cmckay |
Comments
Comment #1
Jeff Burnz commentedWhat are you trying to achieve by this, I ask because its trickier than it sounds - like most Drupal themes it layout is dynamic and relies on the presence of blocks in sidebars to trigger the right CSS classes to get printed in the theme, and thus it displays the correct layout.
Its certainly doable but requires some rethinking and re-jigging of how the CSS works - how are your skills with CSS and PHP?
Comment #2
cmckay commentedI am redesigning myappleguide.com and am displaying the 'dock' on the side and regular text navigation at the top. The final design will look like what you see in the attached image.
So far, this is what i have done:
In the page.tpl file I am calling the primary links at the top and the secondary links in the left sidebar (Technically both are the same, but I needed them to have different menu ids so I could style one set with icons and the other without. (I thought about using the primary links block, but I couldn't style each item separately.)
The problem is that with this implementation, the secondary menu does not show unless I have a block being displayed in the left sidebar.
Thanks for your help!
Comment #3
cmckay commentedI am pretty comfortable with CSS..PHP skills are poor :(
Comment #4
Jeff Burnz commentedOk, I see, I would recommend going with a standard Drupal menu and using http://drupal.org/project/menu_attributes or override theme_menu_item(), I can show you how to do this if you need it - but it will add classes to all menus. Thats the advantage of menu attributes module, you can add unique classes to each individual menu item.
In other words, use a block and add classes to the menu items that you need to, I have found the menu_attributes module to be very useful.
If thats no good (you prefer not to use menu attributes) we'll move to plan b and write some new css for the layout.
Comment #5
cmckay commentedThanks for recommending the module, Jeff. Though it should get everything that I want done, I would prefer to not use a module to handle such a core aspect of the site and would rather write some new CSS. How can I go about doing that? Thanks for your help again!
Comment #6
Jeff Burnz commentedHow about this, I had this snippet lying around so I bashed out a quick tutorial, its for classes on menu items, as you see I am avoiding encouraging changing the layout because that will bite you later on, I'm sure, lets call that plan c now, if the tutorial is no good, then plan c ;)
http://adaptivethemes.com/how-to-add-unique-classes-to-drupal-menus
Comment #7
cmckay commentedHmm..I will heed your warning and avoid plan c at all costs. I copied the code and added it at the end of my template file, renamed it genesis_SL_menu_item_link. The site comes up bank :/ ...am I missing a step? I haven't overridden anything else in my template file so everything else is commented out as default.
Comment #8
Jeff Burnz commenteddid you remove the php tags? otherwise clear the theme registry (you do this by making sure its the first thing to click, so be on the performance settings page already), shouldn't be blank, thats a php error most likely, double check everything
Comment #9
cmckay commentedFantastic! It worked like a charm :D. Jeff, thanks so much for the help!! I'll send you a link next week when the theme is up and running.
Comment #10
Jeff Burnz commentedYes, please do, I will add it to the project page as an example site using Genesis, I like to rotate them and show different sites.