Re: How to automatically add plugin css / scripts to default layout
I was trying to minimize the configuration to add the plugin to the rest of app.
I have thought about seeing if I could add something to the beforeRender in my Plugin's Controllers.
if that does not work, I do like your suggestion about putting the "if" around the echo.
Thanks,
Bill
On 8/12/2012 10:19 AM, chetan varshney [via CakePHP] wrote:
Hi Bill,
You can include anu plugin CSS in default layout only for plugin's Views
if($this->request->params['plugin']=='usermgmt') {
echo $this->Html->css('/usermgmt/css/umstyle');
}
Chetan Varshney
Cakephp User Mgmt Plugin
On Sunday, August 12, 2012 3:34:05 AM UTC+5:30, bs28723 wrote:I have a plugin that has custom CSS and JS files.--
The plugin does not need its own layout - it will use the apps default
layout.
I guess I could just brute force it and put the $this->Html->css() and
$this->Html->script() calls into the layouts/default.ctp file.
but I was wondering, is there a way to configure the controller or
something to call these only when a plugin controller/view is used?
Thanks,
Bill
View this message in context: How to automatically add plugin css / scripts to default layout
Sent from the CakePHP mailing list archive at Nabble.com.
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
If you reply to this email, your message will be added to the discussion below:http://cakephp.1045679.n5.nabble.com/How-to-automatically-add-plugin-css-scripts-to-default-layout-tp5710377p5710392.htmlTo start a new topic under CakePHP, email [hidden email]
To unsubscribe from CakePHP, click here.
NAML
View this message in context: Re: How to automatically add plugin css / scripts to default layout
Sent from the CakePHP mailing list archive at Nabble.com.
--
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home