Hello, I am having a problem concerning controlling the teaser layout of my CCK content type.
I am using Drupal 5.x, CCK module and Contemplate module.
I would like to layout my teasers like this: Picture on the LEFT hand side, and next to it, on the right hand side node title, description, tags, etc. (Like the ifood-tv people do it here: http://www.ifood.tv/recipes)
The problem is: With the Contemplate module I can control the layout of everything exept the title, so in the end the system is generating the final code wrapped around it like this:
<div id="node-x" class="node"> <h2><a href="/[etc]/node/35" title="[TITLE]">[TITLE]</a></h2>
[above template output]
</div>
Do I have to edit node.tpl.php in order to have the node title on the right hand side of my picture? Or is there an easier way?
Help much appreciated! Thanks, Laura
Do I have to edit node.tpl.php in order to have the node title on the right hand side of my picture? Or is there an easier way?
I don't know an easier way to solve your problem. Anyway, editing node.tpl.php is not as hard as it seems at first. You can even (if you have more than one node type you'll probably need to) create a separate template - just name it node-your_node_type.tpl.php .
Good luck, Domas
Not sure if I understand your problem, but did you try to arrange things with CSS by floating the picture left and the rest of the content float: right?
Richard
Domas schrieb:
Do I have to edit node.tpl.php in order to have the node title on the right hand side of my picture? Or is there an easier way?
I don't know an easier way to solve your problem. Anyway, editing node.tpl.php is not as hard as it seems at first. You can even (if you have more than one node type you'll probably need to) create a separate template - just name it node-your_node_type.tpl.php .
Good luck, Domas
Great Domas, thank you. I have created a node-your_node_type.tpl.php for each of my content types, have taken out the node title there, and have integrated the title into my teaser templates. It works fine. All best, Laura
2008/2/25, Domas tasdomas@gmail.com:
Do I have to edit node.tpl.php in order to have the node title on the right hand side of my picture? Or is there an easier way?
I don't know an easier way to solve your problem. Anyway, editing node.tpl.php is not as hard as it seems at first. You can even (if you have more than one node type you'll probably need to) create a separate template - just name it node-your_node_type.tpl.php .
Good luck, Domas
-- [ Drupal support list | http://lists.drupal.org/ ]