Handling Article Slideshows
===========================
Listing a Single Article's Slideshow
------------------------------------
Usage:
.. code-block:: twig
{% gimme slideshow with { name: "slideshow1" } %}
{{ slideshow.code }}
{{ slideshow.createdAt|date('Y-m-d hh:mm') }}
{{ slideshow.updatedAt|date('Y-m-d hh:mm') }}
{% endgimme %}
or
.. code-block:: twig
{% gimme slideshow with { name: "slideshow1", article: gimme.article } %}
{{ slideshow.code }}
{{ slideshow.createdAt|date('Y-m-d hh:mm') }}
{{ slideshow.updatedAt|date('Y-m-d hh:mm') }}
{% endgimme %}
Parameters:
.. code-block:: twig
{% gimme slideshow with { name: "slideshow1", article: gimme.article } %} {{ slideshow.code }} {% endgimme %} - select slideshow by it's code/name and current article.
If the ``article`` parameter is not provided, the slideshow will be loaded for the current article that is set in the context.
Listing a collection of Article's Slideshows
--------------------------------------------
Usage:
.. code-block:: twig
{% gimmelist slideshow from slideshows with { article: gimme.article } %}
{{ slideshow.code }}
{{ slideshow.createdAt|date('Y-m-d hh:mm') }}
{{ slideshow.updatedAt|date('Y-m-d hh:mm') }}
{% endgimmelist %}
The above twig code will render the list of articles slideshows for the current article set in context.
Listing all Article's Slideshows Items
--------------------------------------
Usage:
.. code-block:: twig
{% gimmelist slideshowItem from slideshowItems with { article: gimme.article } %}
{% gimme rendition with {'media': slideshowItem.articleMedia, 'name': '770x515', 'fallback': 'original' } %}
{% endgimme %}
{% endgimmelist %}
The above twig code will render the list of articles slideshows for the current article set in context.
Or if there are audio, video, image files in slideshow:
.. code-block:: twig
{% gimmelist slideshow from slideshows with { article: gimme.article } %}
{{ slideshow.code }}
{% gimmelist slideshowItem from slideshowItems with { article: gimme.article, slideshow: slideshow } %}
{% if slideshowItem.articleMedia.mimetype starts with 'image' %}
{% gimme rendition with {'media': slideshowItem.articleMedia, 'name': '770x515', 'fallback': 'original' } %}
{% endgimme %}
{% elseif slideshowItem.articleMedia.mimetype starts with 'audio' %}
{% elseif slideshowItem.articleMedia.mimetype starts with 'video' %}
{% endif %}
{% endgimmelist %}
{% endgimmelist %}
Listing all Article's Slideshows and its Items
----------------------------------------------
Usage:
.. code-block:: twig
{% gimmelist slideshow from slideshows with { article: gimme.article } %}
{{ slideshow.code }}
{% gimmelist slideshowItem from slideshowItems with { article: gimme.article, slideshow: slideshow } %}
{% gimme rendition with {'media': slideshowItem.articleMedia, 'name': '770x515', 'fallback': 'original' } %}
{% endgimme %}
{% endgimmelist %}
{{ slideshow.createdAt|date('Y-m-d hh:mm') }}
{{ slideshow.updatedAt|date('Y-m-d hh:mm') }}
{% endgimmelist %}
The ``article`` parameter in ``gimmelist`` is optional. If not provided, it will load slideshows for current article.
Listing a Single Slideshow and its Items by Name
------------------------------------------------
Usage:
.. code-block:: twig
{% gimmelist slideshow from slideshows with { article: gimme.article, name: "slideshow1" } %}
{{ slideshow.code }}
{% gimmelist slideshowItem from slideshowItems with { article: gimme.article, slideshow: slideshow } %}
{% gimme rendition with {'media': slideshowItem.articleMedia, 'name': '770x515', 'fallback': 'original' } %}
{% endgimme %}
{% endgimmelist %}
{{ slideshow.createdAt|date('Y-m-d hh:mm') }}
{{ slideshow.updatedAt|date('Y-m-d hh:mm') }}
{% endgimmelist %}
The ``article`` parameter in ``gimmelist`` is optional. If not provided, it will load slideshows for current article.