From baaa63cafde3776d3df0de4e4d009c5e6d1c7e95 Mon Sep 17 00:00:00 2001 From: lukas Date: Wed, 13 Dec 2017 08:59:40 -0500 Subject: [PATCH] /content/docs/templates/imageops added way to access single images and cross content folder image access --- content/docs/templates/imageops/contents.lr | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/content/docs/templates/imageops/contents.lr b/content/docs/templates/imageops/contents.lr index 3a29574a..005f61e7 100644 --- a/content/docs/templates/imageops/contents.lr +++ b/content/docs/templates/imageops/contents.lr @@ -23,6 +23,25 @@ the query. For instance this iterates over all attached images of a page:
{% endfor %} ``` +
+To access images from a different content folder, you would use: + +```html+jinja +{% for image in site.query('/myfolder').attachments.images %} +
+{% endfor %} +``` +
+To retrieve only a specific image or attachment with a certain name you would use + +```html+jinja +{% set my_image site.query('/myfolder').attachments.get('imagenameexample.jpg') %} +
+``` + + + + ## Accessing Image Data