hello,

node gallery is a powerful and good understoodable solution even for beginners, but i'm experiencing the limits for noobs now:

as you told me days before here, there are no special templates for node gallery. i understood, and i after some useless trials i learned, that there is no standard image template (e.g. node-image.tpl.php) in drupal too.

my problem now is: how can i customize the look and output of an image/an image node. for sad i'm not familiar with the preprocessing stuff (theme.inc) and barely able to deal a bit with the php templates (and e.g. change the content output against the output of fields). what means, i don't know ho to do the following without help:

a) when using my own node-node_gallery_gallery_image.tpl.php works, i have no image navigator which i really need. when i try to put the navigator code in my own template (from node_gallery_image_navigator_template.tpl.php, i mess up the php code. or how i must deal with the template?

b) because of a) i use no own template file, but now i'm not able to customize the image node (because there is no themable template). in detail, i want to get rid of the "submitted" information (in other templates i simply remove the php output, but here...?). and the space between the title and the following content is to big (perhaps this is only css question and it's not that important).

im thankful for any link to learn how to deal with the theme.inc or any detailed help for my problem.

thanks and greets,

karsten

Comments

scroogie’s picture

a) The navigator is part of the $content variable.
Otherwise you can also call the navigator directly, with the following snippet in a template:

print theme('node_gallery_image_navigator', node_gallery_get_image_navigator($node->gid, $node->nid), $node);

You do not use the node_gallery_image_navigator_template.tpl.php, except when you want to change the look of the navigator itself! If so, you copy that template to your theme folder and adapt it.

b) The file node-node_gallery_gallery_image.tpl.php *IS* a themable template, its just provided as a template file for convenience, so people can copy that over to the theme to override it. Please have at a look at the Drupal theming documentation.

If you just want to change some spacing or font size or stuff like that, you should better be using CSS instead of the template. I suggest installing the Web Developer extension for Firefox. With Ctrl+Shift+F you can retrieve the CSS information of the element you are hovering with the mouse, which helps you targeting the correct elements with your stylesheets.

hth
scroogie

klaasklever’s picture

that should do it and i see clear. in question b) i do have to sharpen the css-knife, yes.

thank you very much!

scroogie’s picture

Component: User interface » Documentation
Category: support » task

We need to document the theming. This is a good example case.

justintime’s picture

Component: Documentation » Howto/FAQ/Example

updating to an example component

justintime’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.