Resources plugin, default 'requires' in the layout?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Resources plugin, default 'requires' in the layout?

paulbarker
Hi,

I'm probably being dumb here but is there a way of declaring a 'default' set of resources that are automatically included on every page or a way of 'require'-ing them in a layout gsp?

I'm using jQuery UI + theme, etc. and I'd prefer these to be included in the layout. I know I can make all my resource module depend on these core resources but I may not be pulling in any resources at all on my page, which means I won't get the core resources.

I haven't tried the r:external tag yet, which looks like it might solve the problem but not in the most elegant of ways.

Ideally, I'd like to declare the default resources in the 'r:layoutResources' tag.

Paul.
Reply | Threaded
Open this post in threaded view
|

Re: Resources plugin, default 'requires' in the layout?

paulbarker
Ah, I think I can now answer my own question!

Turns out the solution (for anyone who's interested) is to put your <r:require> above the <r:layoutResources>. Then it knows all about them!

Paul.