views-view-row-fia.html.twig in Facebook Instant Articles 8
Default theme implementation to display an item in a views FIA (facebook instant articles) feed.
Available variables:
- options.title: RSS item title.
- options.subtitle: RSS item subtitle.
- options.kicker : teaser short text for the article
- options.created : created datetime
- options.modified : modified datetime
- options.link: RSS item link.
- options.figure: a full html markup for a header image (syntax below)
- options.authors : htmls <address> tags for article authors (syntax below)
- content : HTML content for the article
- footer : HTML content for the article footer
The syntax for the figure allows: <figure> <img src="http://mydomain.com/path/to/img.jpg" /> <figcaption>This image is amazing</figcaption> </figure>
The Syntac for the author <address>: <address> <a rel="facebook" href="http://facebook.com/brandon.diamond">Brandon Diamond</a> Brandon is a avid zombie hunter. </address> <address> <a>TR Vishwanath</a> Vish is a scholar and a gentleman. </address>
datetime="2014-11-11T04:44:16Z">November 11th, 4:44 PM
See also
File
templates/views-view-row-fia.html.twigView source
- {#
- /**
- * @file
- * Default theme implementation to display an item in a views FIA (facebook instant articles) feed.
- *
- * Available variables:
- * - options.title: RSS item title.
- * - options.subtitle: RSS item subtitle.
- * - options.kicker : teaser short text for the article
- * - options.created : created datetime
- * - options.modified : modified datetime
- * - options.link: RSS item link.
- * - options.figure: a full html markup for a header image (syntax below)
- * - options.authors : htmls <address> tags for article authors (syntax below)
- *
- * - content : HTML content for the article
- *
- * - footer : HTML content for the article footer
- *
- * The syntax for the figure allows:
- * <figure>
- * <img src="http://mydomain.com/path/to/img.jpg" />
- * <figcaption>This image is amazing</figcaption>
- * </figure>
- *
- * The Syntac for the author <address>:
- * <address>
- * <a rel="facebook" href="http://facebook.com/brandon.diamond">Brandon Diamond</a>
- * Brandon is a avid zombie hunter.
- * </address>
- * <address>
- * <a>TR Vishwanath</a>
- * Vish is a scholar and a gentleman.
- * </address>
- *
- * datetime="2014-11-11T04:44:16Z">November 11th, 4:44 PM
- *
- * @see template_preprocess_views_view_row_rss()
- *
- * @ingroup themeable
- */
- #}
- <item>
- <title>{{ options.title }}</title>
- <link>{{ options.link.url }}</link>
- <guid>{{ options.guid }}</guid>
- <pubDate>{{ options.created|date("Y-d-m\\TH:i:sT") }}</pubDate>
- <author>{{ options.author }}</author>
- <description>{{ options.kicker }}</description>
- <content:encoded>
- <![CDATA[
- <!doctype html>
- <html lang="{{ options.langcode }}" prefix="op: http://media.facebook.com/op#">
- <head>
- <meta charset="utf-8">
- <link rel="canonical" href="{{ options.link.url }}">
- <meta property="op:markup_version" content="v1.0">
- {% if options.automatic_ad %} <meta property="fb:use_automatic_ad_placement" content="true"> {% endif %}
- </head>
- <body>
- <article>
- <header>
- <!-- The title and subtitle shown in your Instant Article -->
- <h1>{{ options.title }}</h1>
- {% if options.subtitle -%}
- <h2>{{ options.subtitle }}</h2>
- {% endif %}
-
- <!-- The date and time when your article was originally published {{ options.created }} -->
- <time class="op-published" datetime="{{ options.created|date("Y-d-m\\TH:i:sT") }}">{{ options.created|date("F jS, g:i A") }}</time>
- <!-- The date and time when your article was last updated {{ options.modified }} -->
- <time class="op-modified" datetime="{{ options.modified|date("Y-d-m\\TH:i:sT") }}">{{ options.modified|date("F jS, g:i A") }}</time>
-
- {% if options.automatic_ad %}
- <!-- Ad to be automatically placed throughout the article -->
- <figure class="op-ad">
- {{ options.automatic_ad }}
- </figure>
- {% endif %}
-
- {% if kicker -%}
- <!-- A kicker for your article -->
- <h3 class="op-kicker">{{ kicker }}</h3>
- {% endif %}
- {% if options.figure -%}
- <!-- The cover image shown inside your article -->
- {{ options.figure }}
- {% endif %}
- {% if options.author -%}
- <!-- The author of your article -->
- <address>{{ options.author }}</address>
- {% endif %}
-
- </header>
-
- <!-- Article body started -->
- {{ row }}
- <!-- Article body finished -->
-
- {% if footer -%}
- <footer>
- {{ footer }}
- </footer>
- {% endif %}
- </article>
- </body>
- </html>
- ]]>
- </content:encoded>
- </item>