Hallo Andreas,
ich hoffe ich nerve nicht zu sehr Leider habe ich keine Ahnung von PHP. Das Prinzip habe ich verstanden, aber stecke trotzdem fest.
Mein Template sieht im "Rohzustand" jetzt so aus (this zu col geändert) - leider weiß ich schonmal nicht, was eine Änderung von $col-> caption zu $this->caption bewirkt:
PHP-Code:
<div class="<?php echo $this->class; ?> block"<?php echo $this->cssID; ?><?php if ($this->style): ?> style="<?php echo $this->style; ?>"<?php endif; ?>>
<?php if ($this->headline): ?>
<<?php echo $this->hl; ?>><?php echo $this->headline; ?></<?php echo $this->hl; ?>>
<?php endif; ?>
<div class="image_container"<?php if ($this->margin): ?> style="<?php echo $this->margin; ?>"<?php endif; ?>>
<?php if ($this->href): ?>
<a href="<?php echo $this->href; ?>"<?php echo $this->attributes; ?> title="<?php echo $this->alt; ?>">
<?php endif; ?>
<img src="<?php echo $this->src; ?>"<?php echo $this->imgSize; ?> alt="<?php echo $this->alt; ?>" />
<?php if ($this->href): ?>
</a>
<?php endif; ?>
<?php if ($col->caption): ?>
<div class="caption"><?php if ($this->href): ?><a href="<?php echo $this->href; ?>"><?php endif; ?><?php echo $col->caption; ?><?php if ($this->href): ?></a><?php endif; ?></div>
<?php endif; ?>
</div>
</div>
Unten wird ja das Caption gesetzt, gefolgt vom Link wenn ich das richtig verstehe bedeutet das:
PHP-Code:
<?php if ($col->caption): ?>
<div class="caption"><?php if ($this->href): ?><a href="<?php echo $this->href; ?>"><?php endif; ?><?php echo $col->caption; ?><?php if ($this->href): ?></a><?php endif; ?></div>
<?php endif; ?>
Wenn Caption, dann kommt der Link (this->href), wenn keine caption (endif) dann kommt die Caption ohne Link. Ganz zum Schluß wird der Link geschloßen (</a>) richtig? Die Anzeige des Bildes ist doch aber weiter oben im Skript
PHP-Code:
<img src="<?php echo $this->src; ?>"<?php echo $this->imgSize; ?> alt="<?php echo $this->alt; ?>" />
Bin leider total verwirrt
Lesezeichen