das ist keine allgemeine Lösung, die habe ich schon individuell an meine Bedürfnisse angepasst:
news_full.html5
HTML-Code:
<section class="<?php echo $this->class; ?> ce_accordion ce_text block"<?php echo $this->cssID; ?><?php if ($this->style): ?> style="<?php echo $this->style; ?>"<?php endif; ?>>
<div class="layout_full block<?php echo $this->class; ?>">
<?php if ($this->hasMetaFields): ?>
<p class="info"><time datetime="<?php echo $this->datetime; ?>"><?php echo $this->date; ?></time> <?php echo $this->author; ?> <?php echo $this->commentCount; ?></p>
<?php endif; ?>
<h1><?php echo $this->newsHeadline; ?></h1>
<?php if ($this->hasSubHeadline): ?>
<h2><?php echo $this->subHeadline; ?></h2>
<?php endif; ?>
<div class="toggler"<?php if ($this->headlineStyle): ?> style="<?php echo $this->headlineStyle; ?>"<?php endif; ?>>
<?php echo $this->teaser;?>
</div>
<div class="accordion"><div>
<?php if (!$this->addBefore): ?>
<?php echo $this->text;?>
<?php endif; ?>
<?php if ($this->enclosure): ?>
<div class="enclosure">
<?php foreach ($this->enclosure as $enclosure): ?>
<p><img src="<?php echo $enclosure['icon']; ?>" width="18" height="18" alt="<?php echo $enclosure['mime']; ?>" class="mime_icon"> <a href="<?php echo $enclosure['href']; ?>" title="<?php echo $enclosure['title']; ?>"><?php echo $enclosure['link']; ?> <span class="size">(<?php echo $enclosure['filesize']; ?>)</span></a></p>
<?php endforeach; ?>
</div>
<?php endif; ?>
</div></div>
</div>
</section>
das wichtige hierbei ist
<section> einzufügen
<div class="accordion">
<div class="toggler">
man kann nun auch, so habe ich das jetzt gemacht, ein image vor den toggler setzten und per css bearbeiten, sprich einfach ein + oder - damit man weiß ob das akkordeon schon geöffnet ist.
HTML-Code:
<div class="toggler"<?php if ($this->headlineStyle): ?> style="<?php echo $this->headlineStyle; ?>"<?php endif; ?>>
<div class="toggler_image"></div>
<?php echo $this->teaser;?>
</div>
dann bearbeitet man die classen
classe .toggler_image und
classe .toggler.active .toggler_image
identisch, nur mit einem anderen background-image, je nach dem ob das akkordeon geöffnet oder geschlossen ist, ändert sich das image.
Lesezeichen