Forums / Developer / Placeholder for content aggregation in templates
Jan Komárek
Wednesday 08 December 2010 7:41:39 am
Hello,
is possible to create something like placeholder view helper from Zend Framework in EZ Publish templates? For example aggregation of JavaScript code in JQuery document ready function, or dynamicly added javascript and css files.
I have few pages in site, which are heavily utilized with JS widgets, validations and so on and I dont want to have JS files related to concrete pages loaded everywhere.
EZ Publish 4.3 but EZ Webin in version 1.2
Thanks a lot,Vebloud
Łukasz Serwatka
Sunday 12 December 2010 3:50:18 pm
You can use lazy loading for your JavaScript / CSS files with ezjscore templates functions. Or use JavaScript library like YUILoader for instance to load CSS or JavaScript on demand on pages where needed.
http://share.ez.no/learn/ez-publish/ezjscore-ez-publish-javascript-and-ajax-framework/(page)/6
Personal website -> http://serwatka.net Blog (about eZ Publish) -> http://serwatka.net/blog