Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi I Uploaded my umbrao project in IIS and there is a tempalte file which is suppose to show the image in my local pc its showing properly
but it creates a image ulr like this :
<img src='~/media/2824/25.jpg' height="200px" width="300px"/><br/>
here is the template field
<img src='<umbraco:Item field="newsPhoto" runat="server"></umbraco:Item>' height="200px" width="300px"/><br/>
is there anyway i can get rid of the ~ item here
it happens after i upload it in IIS
Hello. What is the document type 'newsPhoto' property itself?
its the alias of upload property itself thank you in that particular document type
thank you any suggestions
Hi there,you should be able to get around this by changing a setting in http://our.umbraco.org/wiki/reference/webconfig/additional-umbraco-specific-appsettingsthis post might also be of helphttp://our.umbraco.org/forum/templating/templates-and-document-types/21168-Upload-Media-pathalso, if you're running the latest Umbraco versionyou could just write some inline razor
<umbraco:Macrorunat="server"language="cshtml"> <imgsrc='@Model.NewsPhoto'alt=''/></umbraco:Macro>
sorry that should have some spaces in it
<umbraco:Macro runat="server" language="cshtml"> <img src="@Model.NewsPhoto" alt="@Model.Name"/></umbraco:Macro>
and you can of course use double quotes.
@Model is your friend.
- Tim
Hi, you need to use the Item control to insert this property to the template. Something like this:
<umbraco:Item runat="server" field="newsPhoto" insertTextBefore="<img src="" insertTextAfter="" alt=""/>" />
Another approach can be to create a reusable macro for rendering such images.
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
Image media item now showing in IIS
Hi I Uploaded my umbrao project in IIS and there is a tempalte file which is suppose to show the image in my local pc its showing properly
but it creates a image ulr like this :
here is the template field
<img src='<umbraco:Item field="newsPhoto" runat="server"></umbraco:Item>' height="200px" width="300px"/><br/>
is there anyway i can get rid of the ~ item here
it happens after i upload it in IIS
Hello. What is the document type 'newsPhoto' property itself?
its the alias of upload property itself thank you in that particular document type
thank you any suggestions
Hi there,
you should be able to get around this by changing a setting in http://our.umbraco.org/wiki/reference/webconfig/additional-umbraco-specific-appsettings
this post might also be of help
http://our.umbraco.org/forum/templating/templates-and-document-types/21168-Upload-Media-path
also, if you're running the latest Umbraco version
you could just write some inline razor
sorry that should have some spaces in it
and you can of course use double quotes.
@Model is your friend.
- Tim
Hi, you need to use the Item control to insert this property to the template.
Something like this:
Another approach can be to create a reusable macro for rendering such images.
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.