2010-08-24 180 views
1

我必須添加一些鏈接到分類術語的顯示位置,我正在使用自定義模塊。我試圖hook_link但它在該節點的末尾添加鏈接,我如何添加鏈接到結題的右側添加鏈接到分類學鏈接區域

非常感謝您

回答

0

爲了延長斯科特的回答是:

你仍然可以使用您的自定義模塊hook_link(),但你需要編輯node.tpl.phpnode-type.tpl.php

即加蘭node.tpl.php樣子:

<?php 
// $Id: node.tpl.php,v 1.5 2007/10/11 09:51:29 goba Exp $ 
?> 
<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 $submitted; ?></span> 
    <?php endif; ?> 

    <div class="content clear-block"> 
    <?php print $content ?> 
    </div> 

    <div class="clear-block"> 
    <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> 

你需要做什麼之前<?php if ($submitted): ...

<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 ($links): ?> 
    <div class="links"><?php print $links; ?></div> 
    <?php endif; ?> 

    <?php if ($submitted): ?> 
    <span class="submitted"><?php print $submitted; ?></span> 
    <?php endif; ?> 
... 

某處移動<?php if ($links): ...塊,然後浮標題和鏈接塊,例如。

+0

非常感謝zerolab – john 2010-08-26 14:33:15

0

你可以主題節點自己(即,創建你自己node.tpl.php或'node-類型 .tpl.php')並在$ terms變量(或任何地方)之後添加任何你想要的。