If the property for "myFile" has an uploaded file, then the <umbraco:Item> tag that you've put in your template will display the value/filepath ... otherwise it displays nothing.
If you needed to make the filepath into a link, then you could try this?
Only show if file is uploaded
I've added an upload property to my document type and display the file with
<umbraco:Item field="myFile" runat="server"></umbraco:Item>
Simple simple, now how do I ask if the file is uploaded and only display it if it's there?
/J
Hi Jess,
If the property for "myFile" has an uploaded file, then the <umbraco:Item> tag that you've put in your template will display the value/filepath ... otherwise it displays nothing.
If you needed to make the filepath into a link, then you could try this?
Note: The HTML in the before/after attributes is escaped. Replace the "Download file" text with whatever you prefer.
Cheers, Lee.
Great! Thank you.
@Lee , can we use something like this:
<a href="@Model.myfile"/>
is working on a reply...