by
KK » Tue Dec 05, 2017 1:20 am
The cms:editable tag defines the region *and also* outputs its content on the front-end.
So, in a sense, your code is doing what it is supposed to do - i.e. output the path of the image.
You are not using its output correctly to set the 'src' attribute of the <img> tag.
As explained in the docs, there are two ways to do that -
1. Define the editable region at the exact spot where you wish to use its output. Your code will then become as follows -
- Code: Select all
<img src="<cms:editable name='placemat_8' label='Placemat Image' type='image' quality='80' show_preview='1' />" alt=""/>
2. Define the editable region at a separate location within <cms:template> (along with all other editable regions) and then use <cms:show> to output its content at the proper location. You code would then become something like this -
- Code: Select all
<cms:template>
<cms:editable name='placemat_8' label='Placemat Image' type='image' quality='80' show_preview='1' />
</cms:template>
- Code: Select all
<img src="<cms:show placemat_8 />" alt=""/>
Hope it helps.