You can also create a lone resource which accepts custom configuration values attached to the resources.view key, and assign them to the View/Helpers at that point. It tends to be a longish class looping the options across a switch statement to detect the custom options and use them.
Matthew's variation would work well too.
Pádraic Brady
http://blog.astrumfutura.com
http://www.survivethedeepend.com
OpenID Europe Foundation Irish Representative
From: Matthew Lurz <mlurz71@gmail.com>
To: fw-mvc@lists.zend.com
Sent: Friday, September 4, 2009 5:12:55 PM
Subject: Re: [fw-mvc] Bootstrap set HeadScript HeadStyle
Yes, but you need resource plugins. I've created resource plugins for link,
meta, script, style and title elements in my Parables library,
http://github.com/mlurz71/parables
Look in Parables/Application/Resource
Whether or not this is a great strategy is another question altogether which
is why I haven't submitted these or my other resource plugins (jQuery, Dojo,
Log, etc).
whisher wrote:
>
> <p>Hi.</p>
> <p>Is it possible to set css and script
> from ini file.</p>
> <p>A thing like</p>
>
> <p>default.link.css = main.css</p>
> <p>default.script.js = std.js</p>
>
>
>
> <p>Thanks in advance.</p>
>
> Bye
>
--
View this message in context: http://www.nabble.com/Bootstrap-set--HeadScript--HeadStyle-tp25296848p25297336.html
Sent from the Zend MVC mailing list archive at Nabble.com.
Matthew's variation would work well too.
http://blog.astrumfutura.com
http://www.survivethedeepend.com
OpenID Europe Foundation Irish Representative
From: Matthew Lurz <mlurz71@gmail.com>
To: fw-mvc@lists.zend.com
Sent: Friday, September 4, 2009 5:12:55 PM
Subject: Re: [fw-mvc] Bootstrap set HeadScript HeadStyle
Yes, but you need resource plugins. I've created resource plugins for link,
meta, script, style and title elements in my Parables library,
http://github.com/mlurz71/parables
Look in Parables/Application/Resource
Whether or not this is a great strategy is another question altogether which
is why I haven't submitted these or my other resource plugins (jQuery, Dojo,
Log, etc).
whisher wrote:
>
> <p>Hi.</p>
> <p>Is it possible to set css and script
> from ini file.</p>
> <p>A thing like</p>
>
> <p>default.link.css = main.css</p>
> <p>default.script.js = std.js</p>
>
>
>
> <p>Thanks in advance.</p>
>
> Bye
>
--
View this message in context: http://www.nabble.com/Bootstrap-set--HeadScript--HeadStyle-tp25296848p25297336.html
Sent from the Zend MVC mailing list archive at Nabble.com.
没有评论:
发表评论