Yii Framework Forum: Do Assets For Specific Extensions Need To Be Added Separately? - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Do Assets For Specific Extensions Need To Be Added Separately? Rate Topic: -----

#1 User is offline   U4EA 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 114
  • Joined: 04-November 12

Posted 28 December 2012 - 03:17 PM

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?
0

#2 User is offline   Backslider 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 263
  • Joined: 23-July 09

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.
We were all once expert at....... nothing.

yii-language-behavior

My Blog
0

#3 User is offline   Boaz 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 280
  • Joined: 23-January 11

Posted 30 December 2012 - 12:28 AM

View PostU4EA, 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?


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
0

#4 User is offline   U4EA 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 114
  • Joined: 04-November 12

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.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users