By santoro on
I'm trying to add node image images alongside the article teasers. Its suppose to lool like this:
http://santoro.ic.cz/image-node.jpg
I only know I should use this piece of code
<div class="ikona_clanku">
<a href="<?php print $node_url; ?>"><?php print $node->node_images; ?></a>
</div>
and add it somewhere to node.tpl.php:
<?php phptemplate_comment_wrapper(NULL, $node->type); ?>
<div id="node-<?php print $node->nid; ?>" class="node<?php if ($sticky) { print ' sticky'; } ?><?php if (!$status) { print ' node-unpublished'; } ?>">
<?php print $picture ?>
<?php if ($page == 0): ?>
<h2><a href="<?php print $node_url ?>" title="<?php print $title ?>"><?php print $title ?></a></h2>
<?php endif; ?>
<?php if ($submitted): ?>
<span class="submitted"><?php print t('!date — !username', array('!username' => theme('username', $node), '!date' => format_date($node->created))); ?></span>
<?php endif; ?>
<div class="content">
<?php print $content ?>
</div>
<div class="clear-block clear">
<div class="meta">
<?php if ($taxonomy): ?>
<div class="terms"><?php print $terms ?></div>
<?php endif;?>
</div>
<?php if ($links): ?>
<div class="links"><?php print $links; ?></div>
<?php endif; ?>
</div>
</div>
But I am not experieced enough to know know how should I place it here to achieve this look: http://santoro.ic.cz/image-node.jpg (article image ALONGSIDE the article)
Can somebody give me some advice? Thanks :-)
Comments
Alternatively, try using the
Alternatively, try using the panels2 module instead? You can do this nicely without troubling yourself with code. If you look in the panels2 handbook, the tutorial on creating a custom home page using panels details this sort of layout, if I remember right.
----
Previously user venkat-rk.
I can't find this module on
I can't find this module on anywhere...
But I think the fastest way would be one-shot modification :-)
Here it
Here it is:
www.drupal.org/project/panels
Check out the tutorials:
http://drupal.org/node/201915
----
Previously user venkat-rk.
Thanks, but this looks even
Thanks, but this looks even more comlicated to me :-)
Only one image to show per
Only one image to show per node?
Just use the Image module, and enable the image_attach module that comes with it. It'll display just like in your mockup.
Yes, one image per node (by
Yes, one image per node (by clicking on that image you can enter the node).
I tried the image_attack module, but I can't figure out how to work it out. When I attache picture to some article, it displays separately and not alongside the article teaser.
Do you mean on the front
Do you mean on the front page of the site?
That's because both the new image node and the node it's attached to are getting promoted to the front page. Change the settings for the image content type.
see node 176196
related issue is discussed in:
http://drupal.org/node/176196
Yes, I mean on front page. I
Yes, I mean on front page. I wan to have the image on front page, but on the left side of the particular node. If I uncheck "promoted on front page" in Image content type, there is no image on front page. So what should I do in these settings?
Check the options for the
Check the options for the content type you're attaching to. Under 'image attach' you should be able to set what to show on teasers -- I'm surprised it's not set to 'thumbnail' by default.
For better understanding,
For better understanding, what I'm trying to do is something like this: http://www.extrahardware.cz/procesory (image on the left side of node teaser.
I finally solved it with
I finally solved it with Image nodes and CSS settings.
images on left
I would like SOME of my images to align on the left and some on the right. I have no idea what the solution is and I'd prefer not to get into some complicated module, but can anyone help me more? When you said you solved it with image nodes and css, I have no idea what that means. I went to my image module and it said nothing about alignment, only about file sizes.