Mein engagierter Coder hat folgende Lösung entwickelt:
PHP-Code:
<?php $pos = 0; $toci=substr_count($this->body, 'tocanker');
if ($toci > 0) {
echo "<h1>Table of content</h1>";
$pos = stripos($this->body, 'tocanker');
for ($tocc=0; $tocc < $toci; $tocc++) {
echo "<a href=\"#tocanker".($tocc+1)."\">";
$pos1=stripos($this->body, '</a>', $pos)+4; $pos2=stripos($this->body, '<', $pos1);
echo substr($this->body,($pos1),($pos2-$pos1));
$pos = stripos($this->body, 'tocanker', $pos2+1);
echo "</a><br/>";
}
?>
Im Grunde funktioniert das so: Die Artikel-Titel werden abgefragt, gelistet und mit einem Anker versehen. Wahrscheinlich ganz simpel – für Leute die etwas davon verstehen.
Ich habe übrigens keine Anhnung von PHP
Lesezeichen