Discussions
Editable_File default image
Hi there,
I've spent a tremendous amount of time trying to solve this:
Before I upgraded to v3 I've been adding images as editable_files with a default value as mentioned in http://doc.locomotivecms.com/references/api/tags/editable-file
Now, after the upgrade, everything works fine on wagon, but not on the engine (e.g. locomotive.works).
I've tried every possible combination of capture and editable_file I could think of and keep missing my default value (which is not something I want to give up!).
Old version:
{% capture coin_topright_url %}{% editable_file "coin_topright_image", hint: "Upload a coin image for the top right coin." %}{% endeditable_file %}{% endcapture %}
with
src=" {% if coin_topright_url != '' %}{{ coin_topright_url }}{% else %}{{ 'coins/student.png' | theme_image_url }}{% endif %}"
Things I've tried (among many others):
src="{{ coin_topright_url | default: '/coins/student.png' | theme_image_url }}"
{% capture coin_topright_ur %}{{ coin_topright_ur | strip_html }}{% endcapture %}src="{{ page.editable_elements.main.landingpage_coins.coin_right_image }}"
src="{% if page.editable_elements.main.landingpage_coins.coin_right_image != '' %}{{ page.editable_elements.main.landingpage_coins.coin_right_image }}{% else %}{{ 'coins/investor.png' | theme_image_url }}{% endif %}"