Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
36 lines (25 sloc) 1.35 KB
{##}
{# You only need the previous line if you use the OctoberCMS Template Language extension in VS Code #}
{# The following line isn't actually required, it just shows you how you can assign a property of this component
instance to a page variable: #}
{% set galleryitems = __SELF__.gallery.items %}
{#
Drop your own code here. For example:
{% for galleryitem in customGallery.gallery.items %}
<div>
<a href="{{ galleryitem.url }}" target="_blank">
<img src="{{ galleryitem.url | resize(280, false, { mode: 'portrait', quality: '90', extension: 'png' }) }}" alt="{{ galleryitem.fileName }}" style="margin: 20px;" />
</a>
</div>
{% endfor %}
Hint: To dig into the gallery (or any other) variable/collection, you have two options.
You can simply add
{{ dump(embeddedGallery.gallery.items.toArray) }}
on your page after the component definition and it will print debug information about that
variable straight in your page. Alternatively, you can install the Debugbar plugin and then add
{{ debug(embeddedGallery.gallery.items) }}
to your page to show debug information in the Laravel debugbar. To see all public properties
of a galleryItem, do:
{{ debug(embeddedGallery.gallery.items.first.toArray) }}.
Make sure to replace "embeddedGallery" with the alias of your component as set in the component options!
#}
You can’t perform that action at this time.