diff --git a/core/modules/node/lib/Drupal/node/Tests/NodeFieldMultilingualTestCase.php b/core/modules/node/lib/Drupal/node/Tests/NodeFieldMultilingualTestCase.php index 67b34e7..65cd547 100644 --- a/core/modules/node/lib/Drupal/node/Tests/NodeFieldMultilingualTestCase.php +++ b/core/modules/node/lib/Drupal/node/Tests/NodeFieldMultilingualTestCase.php @@ -132,9 +132,9 @@ function testMultilingualDisplaySettings() { // Check if node body is showed. $this->drupalGet('node/' . $node->id()); - $body = $this->xpath('//article[@id=:id]//div[@class=:class]/descendant::p', array( - ':id' => 'node-' . $node->id(), - ':class' => 'content', + $body = $this->xpath('//article[@class=:node-class]//div[@class=:content-class]/descendant::p', array( + ':node-class' => 'node-' . $node->id(), + ':content-class' => 'content', )); $this->assertEqual(current($body), $node->body->value, 'Node body found.'); } diff --git a/core/modules/node/node.module b/core/modules/node/node.module index c97851e..6a5a4ec 100644 --- a/core/modules/node/node.module +++ b/core/modules/node/node.module @@ -680,15 +680,15 @@ function template_preprocess_node(&$variables) { // To change user picture settings (e.g. image style), edit the 'compact' // view mode on the User entity. Note that the 'compact' view mode might // not be configured, so remember to always check the theme setting first. - $variables['user_picture'] = user_view($node->getOwner(), 'compact'); + $variables['author'] = user_view($node->getOwner(), 'compact'); } else { - $variables['user_picture'] = array(); + $variables['author'] = array(); } } else { $variables['submitted'] = ''; - $variables['user_picture'] = ''; + $variables['author'] = ''; } // Add article ARIA role. diff --git a/core/modules/node/templates/node.html.twig b/core/modules/node/templates/node.html.twig index 5bf5ad9..b2b56b6 100644 --- a/core/modules/node/templates/node.html.twig +++ b/core/modules/node/templates/node.html.twig @@ -20,14 +20,13 @@ * or print a subset such as {{ content.field_example }}. Use * {{ content|without('field_example') %} to temporarily suppress the printing * of a given child element. - * - user_picture: The node author's picture from user-picture.html.twig. + * - author: The node author, using the 'compact' view mode. * - date: Formatted creation date. Preprocess functions can reformat it by * calling format_date() with the desired parameters on * $variables['created']. * - name: Themed username of node author output from theme_username(). - * - node_url: Direct URL of the current node. + * - url: Direct URL of the current node. * - display_submitted: Whether submission information should be displayed. - * - submitted: Submission information created from name and date during * template_preprocess_node(). * - attributes: HTML attributes for the containing element. * The attributes.class element may contain one or more of the following @@ -75,20 +74,26 @@ * @ingroup themeable */ #} -
+
{{ title_prefix }} {% if not page %} - {{ label }} + {{ label }} {% endif %} {{ title_suffix }} - {% if display_submitted %} -
- {{ user_picture }} - + {% if content.links %} +
+ {{ author }} + {% if display_submitted %} + + {% endif %} + + {{ content.links }}
{% endif %} @@ -96,6 +101,6 @@ {{ content|without('links') }} - {{ content.links }} + {{ links }}
diff --git a/core/modules/rdf/rdf.module b/core/modules/rdf/rdf.module index a6d8270..ea623e7 100644 --- a/core/modules/rdf/rdf.module +++ b/core/modules/rdf/rdf.module @@ -278,7 +278,7 @@ function rdf_preprocess_node(&$variables) { $bundle = $variables['node']->bundle(); $mapping = rdf_get_mapping('node', $bundle); $bundle_mapping = $mapping->getPreparedBundleMapping('node', $bundle); - $variables['attributes']['about'] = empty($variables['node_url']) ? NULL: $variables['node_url']; + $variables['attributes']['about'] = empty($variables['url']) ? NULL: $variables['url']; $variables['attributes']['typeof'] = empty($bundle_mapping['types']) ? NULL : $bundle_mapping['types']; // Adds RDFa markup for the node title as metadata because wrapping the title diff --git a/core/themes/bartik/templates/node.html.twig b/core/themes/bartik/templates/node.html.twig index e61bd9c..060ff65 100644 --- a/core/themes/bartik/templates/node.html.twig +++ b/core/themes/bartik/templates/node.html.twig @@ -20,12 +20,12 @@ * or print a subset such as {{ content.field_example }}. Use * {{ content|without('field_example') }} to exclude the printing of a * given child element. - * - user_picture: The node author's picture from user-picture.html.twig. + * - author: The node author, using the 'compact' view mode. * - date: Formatted creation date. Preprocess functions can reformat it by * calling format_date() with the desired parameters on * $variables['created']. * - name: Themed username of node author output from theme_username(). - * - node_url: Direct URL of the current node. + * - url: Direct URL of the current node. * - display_submitted: Whether submission information should be displayed. * - submitted: Submission information created from name and date during * template_preprocess_node(). @@ -71,23 +71,16 @@ * @ingroup themeable */ #} -
+
{{ title_prefix }} {% if not page %} - {{ label }} + {{ label }} {% endif %} {{ title_suffix }} - - {% if display_submitted %} - - {% endif %}
@@ -96,6 +89,12 @@ {% if content.links %} {% endif %}