Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Write Javascript from plugin - best practice? 
 
peterbergman
Jr. Member
 
Total Posts:  13
Joined:  2013-01-03
 

Hi,

As the topic suggests I would like to know your opinion on best practices for developing plugins that write Javascript to the page.

Lets say that I want to add a global variable to the page upon page load. Should this be done directly from an Observer? Or should it be done with an Observer + a stand alone block that handles the writing? Are there any pros or cons associated with the different techniques?

Thanks.

Peter

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top