php - How do I write internal style sheets in Zend Framework? -


I would like to write an internal style sheet as a sequence in the Zend Framework such as

 < Code> & lt; Top & gt; & Lt; Style type = "text / css" media = "all" & gt; Body {background: #FFFFFF; } & Lt; / Style & gt; & Lt; / Head & gt;  

I understand that I $ this-> view-> gt; HeadLink () - & gt; I can write an external style letter using the attached style sheet ('style.css');

Although I can not find any way to write an internal style sheet any thoughts?

What you're looking for is called the headstyle view assistant. Its manual documentation can be found.

Headset Assistant is API compliant all head * will look helpful, and it works (the following assumes you are in a thought mark): < / P>

  // Put styles in sequence: // These methods assume a string argument containing style rules. // Specially offset at place: $ this- & gt; HeadStyle () - & gt; Offsetet Style (100, $ customstyle); // Excluded Space: $ this- & gt; HeadStyle () - & gt; Attachment style ($ last genre); // $ $ at the beginning - this-> HeadStyle () - & gt; Prepaid style ($ first genre); // capture a block of styles & lt ;? Php $ this- & gt; Head type () - & gt; CaptureStart ()? & Gt; Body {background color: & lt ;? Php echo $ this- & gt; Bg colors? & Gt ;; } & Lt ;? Php $ this- & gt; Head style () - & gt; Capture End ()? & Gt;  

Note that you can enter & lt; Style & gt; Tags are not included, it is generated by the assistant only, in your layout, simply echo assistant where you want it to output:

  & Lt; Head & gt; & Lt ;? Php echo $ this- & gt; Head link ()? & Gt; & Lt ;? Php echo $ this- & gt; Head style ()? & Gt; & Lt; / Head & gt;  

Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -