[dokuwiki] Re: Specifying page template for new pages in URL

  • From: Jason Grout <jason-doku@xxxxxxxxxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Thu, 22 Feb 2007 17:52:48 -0700

Andreas Gohr wrote:
Anthony.Caetano@xxxxxxxxxxxx writes:

Jason, I agree a more flexible mechanism is needed... at the moment there appears to be only http://wiki.splitbrain.org/plugin:template_chooser which I haven't tried, and requires hacking various js bit and which might be out of date...

There is a plugin hook in the page template loading mechanism (at least in the curent devel) which could be used to add the wanted functionality to the addnewpage plugin.

Andi



I looked on the events list page at:

http://wiki.splitbrain.org/wiki:events_list

Are you referring to the HTML_EDITFORM_INJECTION or HTML_PAGE_FROMTEMPLATE events? It seems like the HTML_PAGE_FROMTEMPLATE might be an interesting one to look at.

Let me make sure that I understand the event system. I can register a callback function that will be called when the event is triggered. From the documentation and the source in html_edit, it appears that the only information I have to work with in the HTML_PAGE_FROMTEMPLATE is the ID of the page being created. That's not enough for my purposes (I can't necessarily tell what template I want just from the namespace), though it's a start. Is there a way to access the URL parameters from the event callback? I'm sorry if I seem to have a fixation on the URL parameters, but it's the only way I can think of passing the name of a desired template to the create/edit page.

Thanks,

Jason
--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist

Other related posts: