Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $context = Timber::get_context();
- $page = new TimberPost();
- $context['page'] = $page;
- if ($photos = $page->get_field('photos')) {
- $context['photos'] = $photos;
- }
- {% if page.photos %}
- {% for p in page.photos %}
- <img src="{{ p.sizes.gallery|relative }}" alt="{{ p.alt }}" />
- {{ p.caption }}
- {% endfor %}
- {% endif %}
Add Comment
Please, Sign In to add comment