Autor und Datum seperat definieren

Samstag: 27. Dez 2008

Ausschnitt node.tpl.php

<?php if ($page == 0): ?>
<div class="node-info">
<div class="author"><span><?php print $name ?></span></div>
<div class="date"><span><?php print $date?></span></div>
</div>
<h2 class="title"><a href="<?php print $node_url ?>"><?php print $title?></a></h2>
<?php endif ?>
Dabei wird abgefragt, ob es sich um einen Artikel bzw. nicht um eine Seite handelt und dann wird der Usernamen, das Datum und dann der Seitentitel veröffentlicht. In dieser Form nutze ich die Artikelansicht auf jooon.de

Komplette node.tpl.php

<div class="node<?php if ($sticky) { print " sticky"; } ?><?php if (!$status) { print " node-unpublished"; } ?>">
<?php if ($page == 0): ?>
<div class="node-info">
<div class="author"><span><?php print $name ?></span></div>
<div class="date"><span><?php print $date?></span></div>
</div>
<h2 class="title"><a href="<?php print $node_url ?>"><?php print $title?></a></h2>
<?php endif ?>
<div class="content"><?php print $content?></div>
<?php if ($terms) { ?>
<div class="taxonomy">Tags: <?php print $terms ?></div>
<?php } ?>
<?php if ($links) { ?>
<div class="links"><?php print $links?></div>
<?php }; ?>
</div>
Noch keine Bewertungen vorhanden

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <i>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen

Type the characters you see in this picture. (verify using audio)
Type the characters you see in the picture above; if you can't read them, submit the form and a new image will be generated. Not case sensitive.