[support] Block Styles

sander-martijn lists at severeddreams.com
Thu Dec 27 18:16:36 UTC 2007


You can use either of those options.  the css should go in style.css in 
your theme folder and the best way to find out the name is to simply 
view source.  You probably want to do whatever you can in css before 
messing with the template route.

As for using the template route, what you're finding on page 120 is what 
you need.  The modulename would be the name of the module you're using. 
  If you're using the standard menu system I think it will be 
block-menu.tpl.php or block-menu-1.tpl.php or something along those 
lines.  Then there is also the option of the region as listed - 
block-left.tpl.php would target the left region.




> I'll stick to the more simple solution of css for now ... how do I 
> figure out the unique id of the block though.
> I'm guessing within the block.tpl.php is where I would put this css 
> data?  That would be fine with me.
> It's too bad I can't create a block-menu_name.tpl.php, that would be 
> much simpler and would seem to keep in line with the other standards of 
> Drupal.
> According to the Pro Drupal Development book on Page 120, we can do:
> block-modulename-delta.tpl.php
> block-modulename.tpl.php
> block-region.tpl.php
> 
> Not sure what the 'modulename' is though.
>> You also might want to check this out: http://drupal.org/node/74481 -- 
>> it's a bit dated, but is still pretty relevant.
>>   
> Ok, thanks!   I will definitely take a look.
>> Also, what I'm suggesting assumes that you are displaying your menus via blocks.
>>   
> Yep ... that is what I am doing.   I figure it is the BEST way to do 
> this since I do have hierarchical menus.
> I did create one TEST block with just grabbing, cutting/pasting some 
> HTML (and javascript) code into a block,
> but that didn't work out so well for my menus.  
> I think it would be best to use the Menu System rather than create 
> blocks with HTML.
> 
> Thanks again for the help!
>                                                                     Tom
>> Cheers,
>>
>> Bill
>>
>> Tom Holmes Jr. wrote:
>>   
>>> Thanks for the help with login page.   I am working on that now, and 
>>> that seems to be going ok.
>>>
>>> Now, I am working on the Menu System, and I have created some new menus.  
>>>
>>> This is probably a very easy question ... but for different menus, I'd 
>>> like to have different styles for different menu names.
>>> Along that line ... I'd like to have different styles for different blocks.
>>>
>>> I am going through on how to make themes, and I am looking online and 
>>> through my book "Pro Drupal Development"
>>>
>>> I may find my answer soon, but if anyone wants to point me to the right 
>>> direction, that would be great!
>>>
>>> Thanks!
>>>                                  Tom
>>>   
>>>     
>>
>>   
> 


More information about the support mailing list