Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/40.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/58.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Css 导轨头部样式与ZendFramework相似_Css_Ruby On Rails_Zend Framework_Styles_Head - Fatal编程技术网

Css 导轨头部样式与ZendFramework相似

Css 导轨头部样式与ZendFramework相似,css,ruby-on-rails,zend-framework,styles,head,Css,Ruby On Rails,Zend Framework,Styles,Head,除了rails之外,还可以做类似的事情(ZendFramework)吗 <?php $this->headStyle()->captureStart() ?> body { background-color: <?php echo $this->bgColor ?>; } <?php $this->headStyle()->captureEnd() ?> 身体{ 背景色:; } 您好,您可以在application.h

除了rails之外,还可以做类似的事情(ZendFramework)吗

<?php $this->headStyle()->captureStart() ?>
body {
    background-color: <?php echo $this->bgColor ?>;
}
<?php $this->headStyle()->captureEnd() ?>

身体{
背景色:;
}
您好,您可以在application.html.erb的页眉处添加
,现在假设您想在应用程序的任何其他页面的页眉处添加一些样式,您可以通过
背景色:


我不是php用户,所以我不了解zend,但我希望这能解决您的问题

有没有办法从控制器调用它?在这个网站上搜索“content_for”无需放入视图,这不适合MVC类型的体系结构。视图逻辑应该放在视图中,您可以使用presenter或draper