Skip to content
Permalink
Browse files

prevent block="css" when using inline=false css

  • Loading branch information...
AD7six committed Jan 15, 2012
1 parent b8598c5 commit 22f844c48f3a37948470d0c177d9768fc83a8aaf
Showing with 4 additions and 4 deletions.
  1. +4 −4 lib/Cake/View/Helper/HtmlHelper.php
@@ -232,7 +232,7 @@ public function docType($type = 'html5') {
*
* ### Options
*
* - `inline` Whether or not the link element should be output inline. Set to false to
* - `inline` Whether or not the link element should be output inline. Set to false to
* have the meta tag included in `$scripts_for_layout`, and appended to the 'meta' view block.
* - `block` Choose a custom block to append the meta tag to. Using this option
* will override the inline option.
@@ -401,7 +401,7 @@ public function link($title, $url = null, $options = array(), $confirmMessage =
*
* ### Options
*
* - `inline` If set to false, the generated tag will be appended to the 'css' block,
* - `inline` If set to false, the generated tag will be appended to the 'css' block,
* and included in the `$scripts_for_layout` layout variable. Defaults to true.
* - `block` Set the name of the block link/style tag will be appended to. This overrides the `inline`
* option.
@@ -455,12 +455,12 @@ public function css($path, $rel = null, $options = array()) {
}
if ($rel == 'import') {
$out = sprintf($this->_tags['style'], $this->_parseAttributes($options, array('inline'), '', ' '), '@import url(' . $url . ');');
$out = sprintf($this->_tags['style'], $this->_parseAttributes($options, array('inline', 'block'), '', ' '), '@import url(' . $url . ');');
} else {
if ($rel == null) {
$rel = 'stylesheet';
}
$out = sprintf($this->_tags['css'], $rel, $url, $this->_parseAttributes($options, array('inline'), '', ' '));
$out = sprintf($this->_tags['css'], $rel, $url, $this->_parseAttributes($options, array('inline', 'block'), '', ' '));
}
if (empty($options['block'])) {

0 comments on commit 22f844c

Please sign in to comment.
You can’t perform that action at this time.