Scheid, Bernhard wrote:
Sounds interesting but a bit arcane. I found the
tocLine() function in my Linker.php, but the problem seems to me how to define/override
the $tocline parameter.
Can you give me some more detailled advice? New skin would be no problem, btw...
B.
The skins inherit from the linker.
You could create a skin (supposing you want it to look like the vector
skin) by putting in the appropiate file in the skins folder something
like this:
require_once "Vector.php";
class SkinBernhard extends SkinVector {
var $skinname = 'bernhardtoc';
function tocLine( $anchor, $tocline, $tocnumber, $level, $sectionIndex
= false ) {
$n = strpos($tocline, ' ');
if ($n !== false) $tocline = substr( $tocline, 0, $n );
return parent::tocLine($anchor, $tocline, $tocnumber, $level,
$sectionIndex);
}
}
In this case, if the has a double space, the toc only shows the text
that appears before that.