We've been using MooTools in house for about 2 years now, notice that most of the examples and JS used in Umbraco is JQuery. Is anyone else using MooTools with Umbraco?
We've created an alternative accordian using Mootools, would anyone be interested in it, I could release it as a project I guess?
One problem I noticed, I only wanted to include moo on the accordian pages but the only way I could do it was in the accordian marco code itself and not in the footer where I normally would put it. Is there a cleaner smarter way of including Moo, would be nice to have a similar call as the umbraco library call to include jquery.
You can add several ContentPlaceHolders in the Templates. So you can add a footer ContentPlaceholder and only in the template for the accordion pages you can add the mootools to the template via the footer placeholder
Like it, is it possible to have multiple "scripts" defined? Would they all render out in the placeholder? So if you defined a scripts in one template and then again in a child template would it render out both or just error?
I would recommend not using to many template lvl's, this can get confusing to manage on larger projects. This makes it fairly easy to check if the script is added in parent templates.
Anyone else using MooTools?
We've been using MooTools in house for about 2 years now, notice that most of the examples and JS used in Umbraco is JQuery. Is anyone else using MooTools with Umbraco?
We've created an alternative accordian using Mootools, would anyone be interested in it, I could release it as a project I guess?
One problem I noticed, I only wanted to include moo on the accordian pages but the only way I could do it was in the accordian marco code itself and not in the footer where I normally would put it. Is there a cleaner smarter way of including Moo, would be nice to have a similar call as the umbraco library call to include jquery.
Pete
You can add several ContentPlaceHolders in the Templates. So you can add a footer ContentPlaceholder and only in the template for the accordion pages you can add the mootools to the template via the footer placeholder
hth, Thomas
Ooh I like the sound of that, any chance of a quick and dirty sample? Something close enough will do :)
Add in your master template a placeholder with the id "scripts" on the place you want your scripts to be inserted
In the template where you use your macro requiring the 'my-mootool.js' add:
Like it, is it possible to have multiple "scripts" defined? Would they all render out in the placeholder? So if you defined a scripts in one template and then again in a child template would it render out both or just error?
Cheers
Pete
I thinkt you are searching for the general placeholder concept of asp.net. Take a look here:
http://www.asp.net/learn/master-pages/tutorial-01-cs.aspx
http://www.asp.net/learn/master-pages/tutorial-02-cs.aspx
This evening I can give you more examples, have to prepare for a meeting
Thomas
I would recommend not using to many template lvl's, this can get confusing to manage on larger projects. This makes it fairly easy to check if the script is added in parent templates.
Still no edit button :) more posts for us!
It is possible to add anything or even nothin in a placeholder. You just have to check that your output makes sence.
is working on a reply...