Drupal6: How to programmatically style a block?

Posted by Fronker on Stack Overflow See other posts from Stack Overflow or by Fronker
Published on 2011-06-30T14:57:00Z Indexed on 2011/06/30 16:22 UTC
Read the original article Hit count: 300

Filed under:
|
|
|
|

In Drupal6, I basically have a block (a hierarchical menu structure) that turns out like this in HTML:

<div class="block block-menu_block" id="block-menu_block-1">
<div class="content">
    <div class="menu-block-1 menu-name-menu-navigation parent-mlid-0 menu-level-1">
    <ul class="menu">
        <li class="leaf first menu-mlid-248 active active-trail"><a class="active-trail active" title="" href="/">Start</a></li>
        <li class="expanded menu-mlid-249 active"><a class="active" title="" href="/">Aktuell</a>
            <ul class="menu">
                <li class="leaf first menu-mlid-259">
                    <a title="News und Presse" href="/news-und-presse">News and Press</a>
                </li>...

What I would like to get is actually a lot simpler:

<div id="topmenu">
    <ul class="one">
    <li>some main entry
        <ul>
        <li>
            some sub entry ...

or maybe:

<div id="topmenu">
    <h2>some main entry</h2>
        <h3><a href="#">some sub entry</a></h3>
        <h3><a href="#">another sub entry</a></h3>
    <h2>another main entry</h2>

So, keeping the structure, but being able to use simpler, even completely different tags, if and when needed. I think I understand from the drupal docs, that I am (maybe) looking at

<div class="block block-menu_block"
id="block-menu_block-1"

==>     module := menu_block
    delta  := 1 (?)

regrettably, none of the suggested * block-[module]-[delta].tpl.php * block-[module].tpl.php * block-[region].tpl.php

placed next to page.tpl.php has any impact (yes, I did clear the cache).

© Stack Overflow or respective owner

Related posts about drupal

Related posts about templates