Ne arıyorsun HeadStyle görünümü yardımcı denir. Onun manuel dokümantasyon bulunabilir here.
HeadStyle verecek kişinin API tutarlı olacak tüm Head* görünümü yardımcıları ve (şu bir viewscript vardır varsayar) gibi çalışır:
// Putting styles in order:
// These methods assume the a string argument containing the style rules.
// place at a particular offset:
$this->headStyle()->offsetSetStyle(100, $customStyles);
// place at end:
$this->headStyle()->appendStyle($finalStyles);
// place at beginning
$this->headStyle()->prependStyle($firstStyles);
// Or capturing a block of styles
<?php $this->headStyle()->captureStart() ?>
body {
background-color: <?php echo $this->bgColor ?>;
}
<?php $this->headStyle()->captureEnd() ?>
Note that you do not include the <style> tags in any of this input. That is generated by the helper itself.
Then, in your layout, simply echo the helper where you'd like its output:
<head>
<?php echo $this->headLink() ?>
<?php echo $this->headStyle() ?>
</head>