This:
<img src="$image" alt="$alt" />
returns this:
<img src="<img src="/ss/ss/assets/" alt="" />" alt="Image Alt Text" />
I want $image to return ONLY the image PATH and NOT the <img> tag.
This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
This:
<img src="$image" alt="$alt" />
<img src="<img src="/ss/ss/assets/" alt="" />" alt="Image Alt Text" />
I want $image to return ONLY the image PATH and NOT the <img> tag.
hknight,
I think what you want do to is reference the field inside the $image: $image.url
What is the name of the field that the url gets stored in? Use that field name.
Terry
Use:
$image.Link