我想以 zend 2 风格复制以下语法
"link rel="stylesheet" media="all" href="css/main.css" />"
"link rel="stylesheet" media="screen" href="css/enhanced.css" />"
请帮助任何人。
我想以 zend 2 风格复制以下语法
"link rel="stylesheet" media="all" href="css/main.css" />"
"link rel="stylesheet" media="screen" href="css/enhanced.css" />"
请帮助任何人。
您正在寻找headlink
视图助手
以下是骨架应用程序的一些演示代码:
<head>
<meta charset="utf-8">
<?php echo $this->headTitle('ZF2 '. $this->translate('Skeleton Application'))->setSeparator(' - ')->setAutoEscape(false) ?>
<?php echo $this->headMeta()->appendName('viewport', 'width=device-width, initial-scale=1.0') ?>
<!-- Le styles -->
<?php echo $this->headLink(array('rel' => 'shortcut icon', 'type' => 'image/vnd.microsoft.icon', 'href' => $this->basePath() . '/images/favicon.ico'))
->prependStylesheet($this->basePath() . '/css/bootstrap-responsive.min.css')
->prependStylesheet($this->basePath() . '/css/style.css')
->prependStylesheet($this->basePath() . '/css/bootstrap.min.css') ?>
<!-- Scripts -->
<?php echo $this->headScript()->prependFile($this->basePath() . '/js/html5.js', 'text/javascript', array('conditional' => 'lt IE 9',))
->prependFile($this->basePath() . '/js/bootstrap.min.js')
->prependFile($this->basePath() . '/js/jquery.min.js') ?>
</head>