diff --git a/core/lib/Drupal/Core/Template/TwigExtension.php b/core/lib/Drupal/Core/Template/TwigExtension.php index 4cb31ca..00ab0ce 100644 --- a/core/lib/Drupal/Core/Template/TwigExtension.php +++ b/core/lib/Drupal/Core/Template/TwigExtension.php @@ -56,6 +56,15 @@ public function getFilters() { /** * {@inheritdoc} */ + public function getTests() { + return array( + new \Twig_SimpleTest('content', 'twig_content'), + ); + } + + /** + * {@inheritdoc} + */ public function getNodeVisitors() { // The node visitor is needed to wrap all variables with // render_var -> twig_render_var() function. diff --git a/core/modules/aggregator/templates/aggregator-item.html.twig b/core/modules/aggregator/templates/aggregator-item.html.twig index 8c23106..de476a5 100644 --- a/core/modules/aggregator/templates/aggregator-item.html.twig +++ b/core/modules/aggregator/templates/aggregator-item.html.twig @@ -28,7 +28,7 @@ {{ source_date }} - {% if content %} + {% if content is content %}
{{ parent }}
{% endif %} @@ -97,7 +97,7 @@{{ snippet }}
{% endif %} - {% if info %} + {% if info is content %}{{ info }}
{% endif %}