knowledge-8.x-1.x-dev/templates/knowledge.html.twig

templates/knowledge.html.twig
{#
/**
 * @file
 * Default theme implementation for knowledge.
 *
 * Available variables:
 * - author: (optional) Knowledge author. Can be a link or plain text.
 * - content: The content-related items for the knowledge display. Use
 *   {{ content }} to print them all, or print a subset such as
 *   {{ content.field_example }}. Use the following code to temporarily suppress
 *   the printing of a given child element:
 *   @code
 *   {{ content|without('field_example') }}
 *   @endcode
 * - created: (optional) Formatted date and time for when the knowledge was
 *   created. Preprocess functions can reformat it by calling
 *   DateFormatter::format() with the desired parameters on the
 *   'knowledge.created' variable.
 * - changed: (optional) Formatted date and time for when the knowledge was last
 *   changed. Preprocess functions can reformat it by calling
 *   DateFormatter::format() with the desired parameters on the
 *   'knowledge.changed' variable.
 * - permalink: Knowledge permalink.
 * - submitted: (optional) Submission information created from author and
 *   created during template_preprocess_knowledge().
 * - user_picture: (optional) The knowledge author's profile picture.
 * - status: Knowledge status. Possible values are:
 *   unpublished, published, or preview.
 * - title: (optional) Knowledge title, linked to the knowledge.
 * - attributes: HTML attributes for the containing element.
 *   The attributes.class may contain one or more of the following classes:
 *   - knowledge: The current template type; for instance, 'theming hook'.
 *   - by-anonymous: Knowledge by an unregistered user.
 *   - by-{entity-type}-author: Knowledge by the author of the parent entity,
 *     eg. by-node-author.
 *   - preview: When previewing a new or edited knowledge.
 *   The following applies only to viewers who are registered users:
 *   - unpublished: An unpublished knowledge visible only to administrators.
 * - title_prefix: Additional output populated by modules, intended to be
 *   displayed in front of the main title tag that appears in the template.
 * - title_suffix: Additional output populated by modules, intended to be
 *   displayed after the main title tag that appears in the template.
 * - content_attributes: List of classes for the styling of the knowledge content.
 * - title_attributes: Same as attributes, except applied to the main title
 *   tag that appears in the template.
 * - threaded: A flag indicating whether the knowledge are threaded or not.
 *
 * These variables are provided to give context about the parent knowledge (if
 * any, optional):
 *
 * These two variables are provided for context:
 * - knowledge: Full knowledge object.
 * - linked_entity: Entity the knowledge is attached to.
 *
 * @see template_preprocess_knowledge()
 *
 * @ingroup themeable
 */
#}
<style>
div.field--name-incident-id.field--type-entity-reference {
  display: inline;
}
article.js-knowledge ul.links.inline {
  display: inline;
}
article.js-knowledge ul.links.inline > li{
  padding-right: 0 !important;
}
</style>
<article{{ attributes.addClass('js-knowledge') }}>
  {#
    Hide the "new" indicator by default, let a piece of JavaScript ask the
    server which knowledge is new for the user. Rendering the final "new"
    indicator here would break the render cache.
  #}
  <mark class="hidden" data-knowledge-timestamp="{{ new_indicator_timestamp }}"></mark>


  <div{{ content_attributes }}>

    {{ content|without('links') }}
    <span class="knowledge__author">
      {{ submitted }}
    </span>
    {{ content.links }}
  </div>
</article>

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc