Search
Other Articles Anywhere questions
Forum

Rendering custom text-field in title attribute of <img> HTML

Ton van Loon's Avatar Ton van Loon
I want to use the contents of a custom field (type:text) to be the content of the title-attribute of <img/> HTML like below:
{article}
<img title="[naambestuurslid1]" src="[profielfoto1:url]" width="200" height="200" />
{/article}

It doesn't render the image properly, it renders the standard "missing image" icon and below text string:
<span class=
Sam van Basten Batenburg " src="/images/besturen/sam-van-basten-batenburg.jpg#joomlaImage://local-images/besturen/sam-van-basten-batenburg.jpg?width=1707&height=2560" width="200" height="200" />

Rendering with hard-coded title-attribute works fine:
{article}
<img title="This is the image title" src="[profielfoto1:url]" width="200" height="200" />
{/article}

Rendering a custom text field likewise for the ALT-attribute works fine.

What am I doing wrong? Or is it simply not possible?

Environment:
- J4
- AA 12.0.0
Peter van Westen's Avatar Peter van Westen ADMIN
You want to output the custom field as plain text, not as a - by default - rendered field output.
See: docs4.regularlabs.com/articlesanywhere/d...lain-text-raw-values
Please post a rating at the Joomla! Extensions Directory
Ton van Loon's Avatar Ton van Loon
Thank you for your very quick response, works like a charm!
You can only post on the extension support forum if you have an active subscription and you log in

Buy a Pro subscription