This forum is for assistance with theme development.

Does a menu item have a parent?

I'm writing a theme override where I do/add stuff to the top level li but not to its children. I know how to test whether an item IS a parent but how do you test whether an item HAS a parent? I'm assuming that items in a list with no parents would be the top level. Is there an easier way to isolate the top level li elements?

Does a menu item have a parent?

I'm writing a theme override where I do/add stuff to the top level

  • but not to its children. I know how to test whether an item IS a parent but how do you test whether an item HAS a parent? I'm assuming that items in a list with no parents would be the top level. Is there an easier way to isolate the top level
  • elements?
  • Form Labels

    I'm theming a form in a custom module I'm developing and one of the things that's tripping me up is the way form elements are rendered. I have a theme override function for the form in which I call drupal_render. The problem I'm having is that the label tags are displaying inline with the form elements, where I'd prefer them to be above the form elements. I imagine there's probably a way to do that with CSS but it seems like it would be much easier to just insert a <br> tag in between the label tag and the form element tag. Is there a way to do this?

    Showing login/login elsewhere on page.tpl.php

    Hi, I'm trying to show a login or logout link elsewhere within the content window (rather than have it within the menu system.) If the user is logged in, the logout icon will show up; if they aren't logged in, the login icon will be displayed.

    Currently I have this code within my page.tpl.php file:

    Why phpTemplate instead of Smarty?

    Drupal has awesome features to manage your content structure without writing a line of code. Content management is amazingly flexible.

    help! I've effectively locked myself out

    So i have my custom theme setup to where it will only print the sidebar_left on one particular page that i've created. After a user logs in on this page, the bar is visible on every page in the site, but it is not visible for an anonymous user. This way you can only login if you manually specify the url to the correct node. That node had a particular name. Well that name was changed by me. I changed it then logged out, now i can't get the sidebar_left menu to pop up anywhere at all so i can't administer my site!

    Pages

    Subscribe with RSS Subscribe to RSS - Theme development