foobar
Hello
I'm learning to dev my own plugins for dokuwiki.
Now, I'm playing around with "actions" and would like to create some output for the page.
From a "syntax" plugin, I can do something like:
$renderer->header('My Title, 1, 0)
and the title will be created on the page.
How can I do this from an action?? Is there a "right" way or do I have to write like:
print "<H1>MyTitle</H1>"
The way like in syntax is more flexible, so I would do it like there.
Thanks for every input.
foobar
The same problem with a internallink.
We say, my action create a new page and the print out:
"The page was created. You find it on: " and the internallink from the page ID.
In syntax is also done with:
$renderer->internallink(<id>..)
...or something like that.
chi
To generate an internal link from an ID just use wl() (from inc/common.php). I would say if you only want to display one headline then it would be better to use print (just look at the source of a wiki page to see how it looks like). If you really need the renderer you'll have to instantiate a new renderer object.