Is there a way I can achieve this for every image across my site? Like if i put my markup in the master or a controller? Sorry new to Umbraco/MVC here so any guidance would be much appreciated.
The good way of doing it - create a helper that returns image URL an alternative text or even full tag for you.
Then use this helper everywhere on the site.
No luck on this yet. Would I put this helper within my master? How would I then write it to check all images per page? All I can find when searching the forums is if I were to select each property individually.
Global image alternative text
Is there a way to achieve global alternative text for all images on a site?
I have created a new property under the Image media type, and i got this working for my blog posts only.
Is there a way I can achieve this for every image across my site? Like if i put my markup in the master or a controller? Sorry new to Umbraco/MVC here so any guidance would be much appreciated.
Hi David
The good way of doing it - create a helper that returns image URL an alternative text or even full tag for you. Then use this helper everywhere on the site.
Thanks,
Alex
Hi David
Did you find a solution for this topic? Can you share with our community?
Alex
No luck on this yet. Would I put this helper within my master? How would I then write it to check all images per page? All I can find when searching the forums is if I were to select each property individually.
Hi David,
You could use a dictionary item and then make all logic fall back to that dictionary value...
So, if an 'alt' value exists (from a page field value maybe or simply Model.Name) then use it otherwise use the dictionary item.
But obviously Alex's method is also a workable solution.
is working on a reply...