Would you mind explaining why you need to have JS-files at the bottom of your 
document? 
- you can control order your JS-files
- you can control the execution time of your JS-files
What else do you need to control?

-will

On 16.08.2012, at 12:24, Stef te Winkel (via Magnolia Forums) wrote:

> Dear forum readers,
> 
> I'm facing the following challenge:
> 
> I'd like to create a prototype template in STK with javascript-includes on 
> two different places of the page: one in the head and one just before the 
> closing of the body tag.
> In development mode this will be a list of javascript files on both 
> positions, in production this will be just 2 minified javascript files on 
> those positions.
> 
> To make this possible I found two possible solutions, but both don't feel 
> good.
> 
> 1. Place all the javascript-files in the Themes/jsFiles pointing to the 
> resources, but add for each of them an additional node data 
> "conditionalComment"in which is specified whether this is a header, body or 
> one of the two minified js files, and filter on this in looping the listing.
>   This solution 'misuses'the conditionalComment node data, and you'll have to 
> loop all jsFiles twice. On top of that you'll create a dependency  between 
> the chosen name in the configuration and the code.
> 
> 2. Place the Head javascript files in the Theme and place the body jsFiles in 
> the jsFiles node under the prototype-Template. Retrieve the head ones with 
> the theme, and the body ones with the "def" object.
>   This solution lists the JS files in two diferent locations, and 'misuses' 
> the jsFiles node for exceptions.
> 
> Anybody knows of a better alternative?
> If not, which of the two above should I choose?
> 
> Thanks in advance!
> Kind regards, 
> Stef
> 
> -- 
> Context is everything: 
> http://forum.magnolia-cms.com/forum/thread.html?threadId=fc8b9ebf-378a-4369-9efb-c9f529f34ab5
> 
> 
> ----------------------------------------------------------------
> For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
> Alternatively, use our forums: http://forum.magnolia-cms.com/
> To unsubscribe, E-mail to: <[email protected]>
> ----------------------------------------------------------------
> 



----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to