This forum is for assistance with theme development.

Dissecting the $node

I hope someone can help me. I'm looking for very granular control over the presentation of each element of content in my page nodes. I've set up CCK and now I'm trying to develop a node template that will enclose each field, including the body, in it's own div tag with an id for easy styling.

As someone who is familiar with PHP but not OO PHP, how can I access each element in the $node object? I'm having trouble accessing them, I can only get some to work. Here is what my template looks like:

if ($sticky) { print " sticky"; } if (!$status) { print " node-unpublished"; } ">
 if ($picture) {
      print $picture;
    }

if ($page == 0) {

print $node_url"> print $title

};
print $submitted
print $terms

print $field_header_text[0]['value'];
print $field_bulletedlistone[0]['value'];
print $field_bulletedlisttwo[0]['value'];
print $field_image[0]['value']
print $content['body'][0]['value'];

Changing Garland Menu

HI,
I would like to change the look of the Garland Primary and Secondary links implementing the sliding doors technique. I read this: http://www.usingdrupal.com/node/20 and I tried it, but I'm not able to check if the additional span is there or not (i'm not able to select it via css).
How to do this with Garland, please?

How to display book section in Tab?

I know this is part of node-book.tpl.php, but I have no idea how to hack to display the master and childs of book content-type in tab.
i.e:
I have master page and 2 child pages, what do I need is:
- display master page on Tab-1
- display child 1 on Tab-2
- display child 2 on Tab-3

All tabs displayed on single page.

Please advise how to hack the node-book.tpl.php for above purpose, because my theming skill very limited.

giving different styles to submenu items

Hi, i have a menu that has subitems like this:

-First item
---first subitem
---second subitem
-Second item
---first subitem
---second subitem

Drupal assign the same "menu" class to both ul, how can i give them different styles?

thanks

Adding text to the comment form

I'd like to add text to my comment form, first to give some guidance with Captcha (which is always failing users the first time on my setup--until I find a fix I want to warn them) and secondly to specify the URL format, as many don't know to put the http:// on their website link. I am using the phptemplate engine and a customized template that started life as Zen.

Would I do this in the comment.tpl.php file or would I need to override something like hook_form_alter in template.php? Does anyone have an example of how to do this?

Thank you!

Alix

How to add image after posted by: ... ?

Hi everyone,
How he could do that:

http://i12.tinypic.com/4z4mp2h.png

Only administrators have this image on their node but other users name are showed in plain text mode.
Any idea?

Pages

Subscribe with RSS Subscribe to RSS - Theme development