Hi folks,
When you use an extension that (for example) has a .js file as an asset, do you need to register that script separately? If so, how is this best done? Should be reside in the extension's asset directory or should be moved under public>assets?
Page 1 of 1
Do Assets For Specific Extensions Need To Be Added Separately?
#2
Posted 28 December 2012 - 07:56 PM
If the extension is well written, then the assets will automatically be included. If they don't, I would think twice about the quality of the extension.
#3
Posted 30 December 2012 - 12:28 AM
U4EA, on 28 December 2012 - 03:17 PM, said:
Hi folks,
When you use an extension that (for example) has a .js file as an asset, do you need to register that script separately? If so, how is this best done? Should be reside in the extension's asset directory or should be moved under public>assets?
When you use an extension that (for example) has a .js file as an asset, do you need to register that script separately? If so, how is this best done? Should be reside in the extension's asset directory or should be moved under public>assets?
It should be self contained within the extension's package and 'publish()'ed on demand. After it has been published it should be registered. Generally speaking, All of this should be handled within the extension and using Yii's API methods for publishing and registering CSS file.
Therapeutic PHP sessions My LinkedIn Profile
#4
Posted 30 December 2012 - 05:46 AM
Thanks guys. I've had a closer look at extension architecture and I see now that it is self-contained.
Share this topic:
Page 1 of 1

Help














