On Mon, 31 Mar 2008 17:03:48 +0100
"Thomas Dalton" <thomas.dalton(a)gmail.com> wrote:
My current
results only render a "== title ==" like a normal title would
be rendered but it still does not appear in the table of contents.
What method are you using at the moment?
Something like that:
$wgExtensionFunctions[] = "hwdb";
...
$wgParser->setHook( "hwdb:hardware", "renderHwdbHardware" );
...
function renderHwdbHardware($text, $args, &$parser) {
$parser->disableCache();
...
$wiki_preformatted_output = getFromHwdb(...does SOAP call...)
// the variable now contains something like:
// == Hardware ==
// * Manufactor: ...
// * Model: ...
// * Serial: ...
// == Contact ==
// * Admin: ...
// == Support Contracts ==
// ....
return $parser->recursiveTagParse($wiki_preformatted_output);
}
In the Wiki Source I added
<hwdb:Hardware>myhostname.netcologne.de</hwdb:Hardware>
The result properly renders the "==headings==" and the "* listitems"
but the headings do not appear in the table of contents. Also the
"edit section" links count from one, ignoring that there are sections
before the <hwdb:Hardware> tag.
bye,
-christian-
--
NetCologne Gesellschaft für Telekommunikation mbH
Network Engineering & Design
Am Coloneum 9 Tel.: +49-221-2222-8711
50829 Köln Fax.: +49-221-2222-78711
Geschäftsführer: Werner Hanf, Karl-Heinz Zankel HRB 25580, AG Köln