[dokuwiki] Re: page id from javascript

  • From: "Martin Tschofen" <martin.tschofen@xxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Fri, 14 Sep 2007 19:35:38 -0500

Chris nailed it. I'm trying to get to it from a plugin.
I'll give the TPL_METAHEADER_OUTPUT event a try.

Thanks...martin

On 9/14/07, Chris Smith <chris@xxxxxxxxxxxxx> wrote:
>
> Myron Turner wrote:
> > Is there a reason why one of the above is preferable to embedding this
> >        <script> var ID = "<?php echo $ID; ?>"; </script>
> > in main.php?   This seems the simplest way, but there may be reasons
> > why it's not recommended.
> >
> > Thanks,
> >
> > Myron
> >
>
> Only your initial reluctance to put it there.  If you are building your
> own template, that is the most sensible place to put it.  If you are
> building a plugin and aim for it to be used with several different
> templates then a plugin make more sense.  Either way, I wouldn't
> actually use "ID" as the name just in case there are naming clashes.
> "mytemplatename_ID" or "mypluginname_ID" would be better.
>
> -- Chris
> --
> DokuWiki mailing list - more info at
> http://wiki.splitbrain.org/wiki:mailinglist
>

Other related posts: