Hallo Leute,
ich kenne mich mit PHP leider so gut wie gar nicht aus. Ich möchte im Template "event_list.html5" den Beschreibungstext der mit dem Befehl "echo $this->details;" ausgegeben wird, auf eine bestimmte Zeichenanzahl kürzen (z.B. 100 Zeichen).
Die Methode in der Contaowiki (http://de.contaowiki.org/Catalog_Tem...plate_ausgeben) habe ich bereits gefunden, aber ich weiss leider nicht, was ich damit anfangen soll/kann.
Wäre super wenn ein PHP-Profi mal einen Blick drauf werfen kann und mir den entscheidenden Tipp geben könnte.
Anbei der vorhandene Code aus meinem Template:
PHP-Code:
<?php if ($this->header): ?>
<div class="header<?php echo $this->classHeader; ?>">
<span class="day"><?php echo $this->firstDay; ?>
<time datetime="<?php echo $this->datetime; ?>" class="date"><?php echo $this->firstDate; ?></time><?php if ($this->firstDay): ?> </span><?php endif; ?>
<?php if ($this->time || $this->span): ?>
<p class="time"><?php echo $this->time . $this->span; ?> h</p>
<?php endif; ?>
</div>
<?php endif; ?>
<div class="event layout_list<?php echo $this->classList; ?>">
<h2><a href="<?php echo $this->href; ?>" title="<?php echo $this->title; ?> (<?php if ($this->day): echo $this->day; ?>, <?php endif; echo $this->date; if ($this->time): ?>, <?php echo $this->time; endif; ?>)"<?php echo $this->target; ?>><?php echo $this->link; ?></a></h2>
<div class="ce_text">
<?php
echo $this->details;
?>
</div>
</div>
Vielen Dank!
Lesezeichen