[support] How to remove story desc from front page?

Jonathan Hedstrom jhedstrom at opensourcery.com
Mon Dec 31 23:55:38 UTC 2007



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">&raquo; <?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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: OpenPGP digital signature
Url : http://lists.drupal.org/pipermail/support/attachments/20071231/4d322a7a/attachment.pgp 


More information about the support mailing list