I'm using CMSMS 1.11.7
What is a good learning guide on how to expand the cmsms {image} tag, so that every time I use it, it will automatically apply alt="" to any image?
I don't want to type alt="" every time I use the {image} tag because I have tons of images.
Right now its doing something like...
alt="[/web/ffa.png]"
Thanks for any advice!
bh
[SOLVED]How can we expand attributes of the cmsms image tag?
[SOLVED]How can we expand attributes of the cmsms image tag?
Last edited by blackhawk on Mon Jul 15, 2013 5:49 pm, edited 1 time in total.
Re: How can we expand attributes of the cmsms image tag?
You might want to check the 'addtext' parameter:
Why don't you use a search replace? Or create a UDT.
Code: Select all
{image src="something.jpg" addtext='alt=""'}

Why don't you use a search replace? Or create a UDT.
Re: How can we expand attributes of the cmsms image tag?
Similar problem? http://www.cmscanbesimple.org/blog/call ... from-a-udt
with a solution in an UDT
with a solution in an UDT
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Re: How can we expand attributes of the cmsms image tag?
Velden, for some reason that code has now effect on the image tag. the DOM is still processing alt=[web/image.jpg] when you view it through the console window.
Rolf I think that works! I'll play it it.
Thanks guys
Rolf I think that works! I'll play it it.
Thanks guys
Re: How can we expand attributes of the cmsms image tag?
I created the following UDT, {img}..
It appears to work with...
on my content pages
thanks!
Code: Select all
$src = isset($params['src']) ? $params['src'] : '';
$smarty_data = "{image src='".$src."' alt=' '}";
$smarty->display('eval:'.$smarty_data);
Code: Select all
{img src="web/ffa.png"}
thanks!