Afer I created vocabularies with free terms I can see them in my article on top. How can I put them at the bottom?

Comments

WorldFallz’s picture

edit the node.tpl.php file for your theme and move the html/php that prints the terms wherever you like.

===
"Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime." - Lao Tzu
"God helps those who help themselves." - Ben Franklin
"Search is your best friend." - Worldfallz

linuxuser’s picture

It sounds easy, but it isn't for me.

I use the pixture_reloaded theme.

I removed

<?php if (count($taxonomy)): ?>
        <div class="taxonomy"><?php print t('Posted in ') . $terms; ?></div>
      <?php endif; ?>

Now the terms are not dispalyed anymore.

But I have no idea, where to include it, so the terms are shown at the bottom.

node.tpl.php looks now like this:

<?php // $Id: node.tpl.php,v 1.3 2008/09/09 13:14:22 jmburnz Exp $
/**
 * @file
 *  node.tpl.php
 *
 * Theme implementation to display a node.
 *
 * @see template_preprocess()
 * @see template_preprocess_node()
 */
?>
<div class="node <?php print $node_classes; ?> <?php if (is_front) { print 'front-node'; } ?>" id="node-<?php print $node->nid; ?>">
  <div class="node-inner-0"><div class="node-inner-1">
    <div class="node-inner-2"><div class="node-inner-3">

      <?php if ($page == 0): ?>
        <h2 class="title"><a href="<?php print $node_url; ?>"><?php print $title; ?></a></h2>
      <?php endif; ?>

      <?php if ($unpublished): ?>
        <h4 class="unpublished"><?php print t('Unpublished'); ?></h4>
      <?php endif; ?>

      <?php if (!empty($picture)) print $picture; ?>

      <?php if (!empty($submitted)): ?>
        <div class="submitted"><abbr title="<?php print format_date($node->created, 'custom', "l, F j, Y - H:i"); ?>">
	      <?php print format_date($node->created, 'custom', "F j, Y"); ?></abbr> <?php print t('by'); ?> <em><?php print $name; ?></em>
        </div>
      <?php endif; ?>

      <div class="content clearfix">
        <?php print $content; ?>
      </div>

      <?php if (!empty($links)): ?>
        <div class="actions clearfix"><?php print $links; ?></div>
      <?php endif; ?>

    </div></div>
  </div></div>
</div> <!-- /node -->
gbrussel’s picture

It should be placed somewhere around $content (which generates the node's content) and the $links, which is at the bottom of the node.

linuxuser’s picture

Thanks, works great!

    <div class="content clearfix">
        <?php print $content; ?>
      </div>

      <?php if (count($taxonomy)): ?>
        <div class="taxonomy"><?php print t('Posted in ') . $terms; ?></div>
      <?php endif; ?>

      <?php if (!empty($links)): ?>
        <div class="actions clearfix"><?php print $links; ?></div>
      <?php endif; ?>

Is it easy to change the alignment from left to right and italic?

There should be a clear difference between the content and the terms.

gbrussel’s picture

You can modify the CSS for the class "taxonomy", as well as splitting up the PHP print so that "Posted in " gets different styling from the actual terms. However, since the $terms variable will print out links, you can style them using

<style>
.taxonomy a {
  text-decoration:none;
  font-style:italic;
}
</style>

to control the styling of those links.

linuxuser’s picture

Thank you again, I never thought, that I had to modify the theme for this. Since the theme is in development, can I do anything, that my changes are not deleted after every update? I mean something like you can do in a menalto gallery, where everything is untouched, which is in a "local-folder"

BTW, do you have any idea where I can remove the location.info which I asked at http://drupal.org/node/318672 Probably it is very simple and it is a similar question to this thread.

linuxuser’s picture

My css-knowledge is very limited.

I didn't find out where and in which file to insert

.taxonomy a {
  text-decoration:none;
  font-style:italic;
}

I changed the line to:

 <div class="taxonomy"><?php print t('Posted in:<br />') . $terms; ?></div>

so the terms are starting in a new line. This looks a lot better (for me).

BTW, I solved my other question, which looks so similar to this, but probably isn't. I think you have to change the code of the module. But there is an option in the location configuartion, where you can disable it.

gbrussel’s picture

You'll need to place that at the *bottom* of your theme's CSS file (style.css or styles.css, usually).

linuxuser’s picture

I placed it at the bottom of style.css and it didn't work. But I am happy with the solution I have at the moment. The linebreak is an acceptable solution for me. Thanks a lot for your help!