Display the default placeholder content if there is no put tag for the placeholder

This commit is contained in:
alekseybobkov 2014-10-16 22:36:00 -07:00
parent 219f1ff8f7
commit d4bc164fb2

View File

@ -200,7 +200,7 @@ class Extension extends Twig_Extension
public function displayBlock($name, $default = null)
{
if (($result = Block::placeholder($name)) === null)
return null;
return $default;
$result = str_replace('<!-- X_OCTOBER_DEFAULT_BLOCK_CONTENT -->', trim($default), $result);
return $result;