facebook-post.html.twig in Facebook Feed Block 8
Template for displaying a post in a Facebook feed block.
Available variables:
- id: Description.
- created_time: Description.
- message: Description.
- link: Description.
- picture: Description.
- show_socials: Description.
- num_likes: Description.
- num_comments: Description.
- num_shares: Description.
1 theme call to facebook-post.html.twig
- FacebookFeedBlock::themePost in src/
Plugin/ Block/ FacebookFeedBlock.php - Creates a themable array of post data.
File
templates/facebook-post.html.twigView source
- {#
- /**
- * @file
- * Template for displaying a post in a Facebook feed block.
- *
- * Available variables:
- * - id: Description.
- * - created_time: Description.
- * - message: Description.
- * - link: Description.
- * - picture: Description.
- * - show_socials: Description.
- * - num_likes: Description.
- * - num_comments: Description.
- * - num_shares: Description.
- */
- #}
- <article data-post-id="{{ id }}" class="facebook-post">
- <div>
- <a href="{{ link }}">
- <img src="{{ picture }}">
- </a>
- </div>
- <div>
- <time datetime="{{ date }}">{{ created_time|date('j M Y') }}</time>
- <p>{{ message }}</p>
- {% if show_socials %}
- <p class="sharing-data">
- <i class="fa fa-thumbs-up" aria-hidden="true"></i>
- {{ num_likes }}
- <i class="fa fa-comment" aria-hidden="true"></i>
- {{ num_comments }}
- <i class="fa fa-share" aria-hidden="true"></i>
- {{ num_shares }}
- </p>
- {% endif %}
- </div>
- </article>