As part of an SEO enhancement project, I’ve been tasked with adding the following property inside the markup for the image that the field renderer is generating on the page:
itemprop="contentURL" – before the closing tag.
<sc:FieldRenderer ID='FieldRenderer_MainImage' Runat='server' FieldName='Homepage Image'
CssClass="_image" Parameters="w=150" itemprop="contentURL" />
When I tried to place this inside the Field Renderer, or add it as a “parameter” – it doesn’t work.
Is there another way to do this, without having to create a control file and generate the output in the code-behind?
You actually cannot do this on a
FieldRenderer. You’re options are:FieldRendererwith the ability to do this (this will likely require a high level of effort)