I need help getting my alt text to populate on the front-end.
I added my alt text field to the Image Media Type.
Where do I add the code string, so it populates on the front-end? I only have 3 templates: Master, Content and Home.
Is this the correct code?
alt="@(item.GetPropertyValue
I am not a web developer, so please explain this like I'm 10yrs old. Let me know exactly where is goes, and if you have the correct code, that would be very helpful. This really is a feature that should be provided "out-of-the-box" for SEO purposes.
My page type is both "Page" and "News Article". Those are the pages that most utilize my images.
In my partial view, I have my "Media" file. I'm assuming I put that snippet of code on that page. Do you think this is correct? Can I put it anywhere on the page? Sorry I'm soo clueless. I'm a front-end designer, forced to do back-end work.
Adding Alt Text to all photos
I need help getting my alt text to populate on the front-end.
I added my alt text field to the Image Media Type. Where do I add the code string, so it populates on the front-end? I only have 3 templates: Master, Content and Home.
Is this the correct code?
alt="@(item.GetPropertyValue
I am not a web developer, so please explain this like I'm 10yrs old. Let me know exactly where is goes, and if you have the correct code, that would be very helpful. This really is a feature that should be provided "out-of-the-box" for SEO purposes.
Thank You. Michelle
If
item
is the media item then :should be all you need.
Do you know what template I place that code in? Can I place it anywhere in the file? Thanks soo much for your help.
There is probably a file in the Views folder which has the same name as the type of page. You can add it there.
See Dennis's solution here: https://our.umbraco.com/forum/developers/razor/62062-Display-an-image
My page type is both "Page" and "News Article". Those are the pages that most utilize my images.
In my partial view, I have my "Media" file. I'm assuming I put that snippet of code on that page. Do you think this is correct? Can I put it anywhere on the page? Sorry I'm soo clueless. I'm a front-end designer, forced to do back-end work.
Hi Michelle,
Get the image property value using
If you are in macro use model.content instead of Model
We figured out what file to place the altText code. It's working now!! Thanks everyone.
Hi Michelle,
Could you tell me where you place the alt-text code and which code you place? Actually, I'm also not a developer like you. Thanks.
is working on a reply...