Closed lasbian closed 10 years ago
You can create custom meta in Phile which you couldn't do by default in Pico. You access it with {{ page.meta.custom_key }}
.
You problem with this snippet is your twig code.
{% for page in pages %}
{# you do not need the curly braces inside other braces #}
{% set images = loop(page.meta.folder) %}
{% for image in images %}
<div class="col-1-2">
<a href="{{ image.url }}" data-count="{{ image.id }}" target="_blank">
<img src="{{ image.url }}" width="{{ image.width }}" height="{{ image.height }}" alt="{{ image.name }}">
</a>
</div>
{% endfor %}
{% endfor %}
My page would look like this:
<!--
Title: My Page Title
Folder: /path/to/a/folder
-->
My content...
amazing. just amazing :)
Thanks!
Hi there,
Just started Philing. As the title states i'm hoping to pass a twig variable to the phileFolderLoop plugin, letting the loop walk over images in every page within the page 'for-loop'. Two issues i have:
a) The phileFolderLoop plugin does not handle twig variables. Can this be handled?
b) Obviously the {{ page.path }} is pseudo-code, since .path is not a phile-callback such as page.url. How do i get around this?
If working this would be an ideal scenario:
I hope you get my problem :)
Lasbian