Hardik Shah wrote:
i think we can do it by customizing node-storylink.tpl.php but when i comment out the <?php print $content ?> statment in the bellow code then the vote updown widget also stops appering as the code for it is in the $content itself.so is there any way where i can modify the code and make it so that if $page==0 then it only display the code for widget and not the contents?
<!-- start node -->
<div id="node-<?php print $node->nid; ?>" class="node storylink clear-block<?php print ($sticky) ? ' sticky' : ''; print (!$status) ? ' node-unpublished' : ''; ?>"> <?php print $picture ?> <h2 class="title"><a href="<?php print $storylink_url ?>"><?php print ($seqid) ? $seqid .'. ' : '' ?><?php print $title ?></a></h2> <?php print $vote_storylink_via ?> <?php print $vote_up_down_widget ?> <div class="content"><?php print $content ?></div> <div class="submitted"><?php print $submitted ?> <?php if ($terms): ?> <span class="terms"> | <?php print t('Tags') ?>: <?php print $terms ?></span> <?php endif; ?> </div> <?php if ($links): ?> <div class="links">» <?php print $links ?></div> <?php endif; ?> <br class="clear" /> </div>
The $node object should have a content array, such that for a module called "my_module", you could print the desired content in the above template using something like:
print $node->content['my_module']['#value'];
Cheers, Jonathan