This forum is for assistance with theme development.

Printing the node type to edit screen

Does anyone know of a way to indicate the content/node type that is being used on the edit view. Our admin/edit pages are using the Garland theme, and I'd like to just print the words "Content type: Page [or other node type]" right at the top of the edit screen. Is there an elegant way for doing this, without modifying the garland page.tpl.php file? Also I should state that the contributors for this site will not have the Dev render tab, thus the reason for printing it to the edit tab.

Thanks in advance for any advice!
Colleen

Add "active" class to menu LI

Output from my theme_links($secondary_links, array('class' => 'links secondary-links')) function looks like this:

<div id="secondary"><ul class="links secondary-links"><li class="first menu-2-1-74"><a href="/taxonomy/term/5" class="menu-2-1-74 active">View Submitted News</a></li>
<li class="last menu-2-2-74"><a href="/node/add/news" class="menu-2-2-74">Add News</a></li>
</ul></div>

The A tags have the "active" class when applicable, but I'd like the LI tags to have that class as well so that I can style with CSS. I've tried a custom function, which seems like it should work, but isn't. Where is the "active" class coming from for the A tags, and how do I get it in the LI tags also? Thanks!!


function kevin_theme_links($links, $attributes = array('class' => 'links')) {
$output = '';

if (count($links) > 0) {
$output = '

    ';

    $num_links = count($links);
    $i = 1;

    foreach ($links as $key => $link) {
    $class = '';

    //MY CHANGES:
    //Search for 'active' in $key and append to $class for LI.
    if (strpos($key, '-active') !== FALSE) {
    $class = 'active ';
    }

    // END MY CHANGES

    // Automatically add a class to each link and also to each LI
    if (isset($link['attributes']) && isset($link['attributes']['class'])) {

Changing search result from vertical to horizontal breaks garland theme

Hi,

With the great help of nancyw and dvessel (http://drupal.org/node/165043) I managed to reformat the search result page from vertical to horizontal look. But it comes with a price, the content of the right hand side bar shifted to the main (middle) section in the search result page.

Anyone encounter the same phenomena? Appreciate an advice on how to fix it.

Thanks in advance,

Block CSS Help

I am having some real issues trying to add custom css for certain blocks. I know I have done this with the older 5.0 version and had no problems. I cannot seem to make any changes in the newest version.

The below code should change the login block.

Views, Block and menu item active

Hi everyone,

I wonder if somebody could help me?

I have a few menu blocks that are created dynamically using the excellent Views module which are displayed on a "normal" page, as well as a CCK page

So for example:

at where i can able to see the page.tpl.php for every individual node

hello friends I want to see the page.tpl.php of every individual node(page)

at where the files rely plese tell me

Pages

Subscribe with RSS Subscribe to RSS - Theme development