This forum is for assistance with theme development.

CSS and a specific field in a custom template problem

Hey all

I have a little CSS question if anyone can help.

I have a custom form for submitting content with. The problem is all of the form input boxes are the same size, which is fine for all of them except one that I really need to be at least twice as wide.

Here is the code to call the relevant box

<?php print drupal_render($form['taxonomy']['tags'][2]); ?>

As you can see it prints a box for taxonomy 2, but its the same length as all the rest.

how to print submenus depending on the node id

I'm working on my custom theme based on Zen (the template not the philosophy)
and i have a menu where i want an added class on the "selected" list item. I had done something similar with wordpress which was pretty simple

<ul id="nav">
     <li id="home" ><a <?php  if ($is_front){ echo " class=\"selected\"";}?> href="index.html">HOME</a></li>
   <li id="about" class="menbutton"><a href="about.html">ABOUT</a></li>
   <li id="beauty" class="menbutton"><a href="beauty.html">BEAUTY</a></li>
  <li id="thesalon" class="menbutton"><a href="thesalon.html">THE SALON</a></li>
   <li id="thestudio" class="menbutton"><a href="lacys photography.html">LACYS PHOTOGRPHY</a></li>
    <li id="contact" class="menbutton"><a href="contact.html">CONTACT</a></li>  
 </ul>

if you look at the first list item i have the sort of if argument i want .
The one on top works perfect
but i need one where it would do it depending on the node id
this is what i have tried to do but it doesn't seem to work

<?php if ($node->id == '7'){ echo " class=\"selected\"";}?>

can anyone help me out i'm sure it's a very simple argument to code but I's just a newbie
also can you do something like this ,

<?php if argument =='7|8|45' ->the result ?>

where 7|8|45 means if it's either of these values?

Hiding taxonomy links if it has no articles?

Hey everyone!

Is there a way to hide taxonomy links that have nothing linked to them?

Thanks

How to get the parent id from the child ($pid from $mid)?

I've been all over this site and closely inspected menu.inc and can't figure this out.

I want to theme individual menu items with theme_menu_item(), but base my if/else statements on the id of the parent, so I can theme whole menus at once. Surely there is a way, knowing the $mid, to access the $pid through this function? Or am I going down the wrong path?

Custom Menu in a new Block

Hi everyone !

I want to tell that you have done a REALLY GOOD JOB ! ! ! Drupal is really fantastic ! :D

But I need some help to do something. I want to create a custom menu (in a block) that will be displayed like this (Links will be pictures) :

Link 1             Link2               Link3
Link 4             Link5               Link6

And I don't know how to do this. I've been looking in the forum but didn't find any answers to solve my little problem.

Get current menu nesting level

Is there anyway to get out the current menu nesting level? It would be dandy to have a class for all sublevels, something like:

Pages

Subscribe with RSS Subscribe to RSS - Theme development