I'm sure there must be an easy way to do this, I just can't seem to find it;) I want to add the word Tags: in front of the free taggling links, like they did on this page http://www.jewcy.com/feature/adventures_in_arabia

Any help?

Thanks,
Lisa

Comments

notarealperson’s picture

One way to do it would be to add in the word Tag: in your node.tpl.php file before the categories links are output. Probably a more elegant way to do it though.

lisar’s picture

I just want it in front of certain content types. I'm also not exactly sure how to do the above. I'd need to see an actual code snippet..

Thanks,
Lisa

pcwick’s picture

After looking at your example link, I agree with the the suggestion that you try editing node.tpl.php. To modify only a particular type of node, you can create and edit a node-type.tpl.php, where "type" is name of the node type. An example of editing node-blog.tpl.php is here: http://drupal.org/node/44699

You'll probably want to look at some more documentation in the handbook about editing node types here: http://drupal.org/node/46012

PAAHCweb’s picture

The Sands theme does this by default. Here is the whole node.tpl.php:

<?php
  // Generate CSS classes for the node
  $classes = array();
  if ($sticky)
    $classes[] = 'sticky';
  if (!$page) {
    $classes[] = 'item-listing';
    $classes[] = $zebra;
    $classes[] = "node-list-$seqid";
  }
  $classes = ' ' . implode(' ', $classes);
?>
  <div class="node<?php print $classes; ?>">
    <?php if ($picture) print $picture; ?>
    <?php if (!$page) { ?><h2 class="title"><a href="<?php print $node_url?>" title="<?php print $title?>"><?php print $title?></a></h2><?php }; ?>
    <div class="info">
      <?php if ($submitted) { ?>
      <span class="submitted">
        <span class="user"><?php print format_name($node); ?></span> - 
        <span class="date"><?php print format_date($node->created, $type="large"); ?></span>
      </span>
      <?php } ?>
      <?php if ($terms) { ?> <span class="taxonomy">Tags: <?php print $terms?></span> <?php } ?>
    </div>
    <div class="content">
      <?php print $content?>
    </div>
    <?php if ($links) { ?><div class="links">&raquo; <?php print $links?></div><?php } ?>
    <div class="clear"></div>
  </div>

D. Lynn

lisar’s picture

That worked perfectly, thank you:) Unfortunately, I find it a lot easier to learn by seeing it in use, so having the code there really helped:)

Lisa