Voog.com

editable

This tag makes value of an object editable when editing session is active. Mostly used for article and element fields. If editing session is not active it displays the value of the field. Only one editable per field should exist on page.

{% editable object.field %}

Supported objects and fields

List of available attributes

lookup_page_id

This attribute is supported in case of element related fields edit mode lookup form. When defined then related elements are searched only in the given page. If not defined then related elements are searched in the whole site.

{% editable element.subcategory lookup_page_id: page.id %}

lookup_path_prefix

This attribute is supported in case of element related fields edit mode lookup form. When defined then related elements are searched only in the given path prefix. If not defined then related elements are searched in the whole site.

{% editable element.subcategory lookup_path_prefix: "my-catalogue/subcategory" %}
{% editable element.subcategory lookup_path_prefix: page.path %}

target_width

In case of element image type field it has an additional parameter target_width defining the target size of image that url should be returned from the list of automatically generated image sizes. Obtained image size is smallest possible image that will not upscale for the given size. If non-upscaling image is not found, the biggest one (original) is returned instead.

{% editable element.image target_width="600" %}

Current automatically generated image sizes list by width is (may change in future): original, 600, 1280, 2048.  If original is smaller than given size, bigger sizes for images are not generated.