[dokuwiki] Re: JavaScript include conditionals

  • From: "Martin Tschofen" <martin.tschofen@xxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Fri, 19 Jan 2007 19:57:31 -0600

I guess what started this all was that I'm using the same core of js code
for a couple of different plugins as well as my main template.
In the current situation I can't release the plugins as the common code is
deployed in the template.
If I add it to a helper plugin it wouldn't work for the template as plugins
get loaded after templates.

If I understand your alternatives correctly, the dojo loader would only work
in a template and I can't mess with the server.


I prefer Andi's solution as that makes it easier to maintain js files as
long as it only loads one js file with the same names accross templates and
plugins.

In regard to extra syntax: would it make sense to use the style.ini solution
where we specify the css file and it's scope. In the script.ini file we'd
enter the js file and indicate if it's loaded once or loaded all the time.

...martin


On 1/19/07, Andreas Gohr <andi@xxxxxxxxxxxxxx> wrote:

On Fri, 19 Jan 2007 13:56:37 +0000
Chris Smith <chris@xxxxxxxxxxxxx> wrote:

> I'm not so keen on this "extra syntax".  I think the helper plugin
> idea works better.  If helper plugins are in place for common php
> code, why not use them for common javascript and css too.  That to me
> makes more sense than introducing a new syntax.

I see it not as replacement to the helper plugins, but as addition. We
already enhanced the CSS syntax by adding the replacement patterns.
Introducing something alike for JavaScipt would make sense in my
opinion.


--
http://www.splitbrain.org



Other related posts: