AI OnAI Off
I you have a URL to Image and uses the <episerver:property propertyname="Topic01_IMG01" runat="server" />, won't that display the image?
if you don't want to do any code behind you can just do
<% if (CurrentPage["propertyname"] != null) { %>
<img src="<%= CurrentPage["propertyname"]" />
<%}%>
He he, so simple. Ok, thank you very much. I will test it tomorrow, sure it will work.
Oh dear, I really need to study this!
I mark "Mark as answer" tomorrow if it works.
Hi!
I have a challange here. I want to provide for editors a field to browse to an image. If I use a property and (in Epi admin mode) make it an "Url to Image", Epi just prints the path to the image when the editor publish the page. What is the meaning of that? Why not an img tag with the source attribute?
Ok, so instead I use this method
<img src="<%= CurrentPage["Topic01_IMG01"] %>" alt="" style="width:260px;" />
I make it as an Url to Image property in admin mode, and sure it works. And yes I can provide a way to make an alt text too. But! The problem is this, if the editor doesnt browse to an image the src attribute gets empty and the browser displays a broken image.
So I want the img tag to not be displayed if the editor doesnt browse to an image. How do I do it?
And please, I'am a newbie developer, so be kind and keep it as simple as possible and explain it well. Thank you so much.
I study at home and will attend to the boot camp course.