|
|
 Rank: Enthusiast
Joined: 7/2/2008 Posts: 34 Location: India
|
Hi I am trying hard but could not figure out how images works in v4 in Templates... In V3 I used images like Code: <img src="<?UMBRACO_GETITEM field="ProductsImages"/>" alt="" />
but If wish to do the same in V4 I get error... I tried using quotes and without quotes and also with different braces.. nothing works... Code: <img src="<umbraco:Item field="ProductsImages" runat="server"></umbraco:Item>" alt="" /> also <img src=<umbraco:Item field="ProductsImages" runat="server"></umbraco:Item> alt="" />
Please help in using the images in V4 Thanks, Amritanshu Good judgment comes from experience, and often experience comes from bad judgment. So experience is simply the name we give our mistakes...
|
|
 Rank: Fanatic
Joined: 7/19/2006 Posts: 496 Location: Göteborg, Sweden
|
In V4 getitem is replaced with Umbraco:Item, click the help symbol for correct syntax.. // ;) Kalle
" - Yeah I'd like to share your point of view, as long as it's my view too... ( http://www.d-a-d.dk/lyrics/pointofview)
|
|
 Rank: Enthusiast
Joined: 7/2/2008 Posts: 34 Location: India
|
Hi Kalle, I already mentioned that part in my post... I knew that Quote:In V4 getitem is replaced with Umbraco:Item, click the help symbol for correct syntax.. thats what I have mentioned in my problem too that I am using Quote:but If wish to do the same in V4 I get error... I tried using quotes and without quotes and also with different braces.. nothing works... Code: Code: <img src="<umbraco:Item field="ProductsImages" runat="server"></umbraco:Item>" alt="" /> also <img src=<umbraco:Item field="ProductsImages" runat="server"></umbraco:Item> alt="" />
Please help in using the images in V4 ... I hope u understand that its not the issue.... thanks for the response but I am still in the mess.... Good judgment comes from experience, and often experience comes from bad judgment. So experience is simply the name we give our mistakes...
|
|
 Rank: Aficionado
Joined: 6/5/2008 Posts: 148 Location: United Kingdom
|
I think you need to replace some of your double-quotes " with single quotes ' . Code: <img src="<umbraco:Item field='ProductsImages' runat='server'></umbraco:Item>" alt="" />
Adam Perry ( blog, twitter), developing Umbraco based websites and applications for ConnectDigital.
|
|
 Rank: Enthusiast
Joined: 7/2/2008 Posts: 34 Location: India
|
Bingo !!! it works.... Thanks Adz... I should have figured out that....
Good judgment comes from experience, and often experience comes from bad judgment. So experience is simply the name we give our mistakes...
|
|
 Rank: Aficionado
Joined: 6/5/2008 Posts: 148 Location: United Kingdom
|
Glad i could help :-)
Adam Perry ( blog, twitter), developing Umbraco based websites and applications for ConnectDigital.
|
|
Rank: Newbie
Joined: 9/11/2008 Posts: 8 Location: Sundsvall, Sweden
|
I'm using Umbraco V3.0.3 and when I try to use: Code:<img src="<?UMBRACO_GETITEM field="contentImage"/>" alt="" />
Where "contentImage" is my alias for the Media Picker, all i get is the ID for the image, not the URL. I thought it was supposed to be like that and made a Macro to render images from a media picker, but when the original poster in this code said he used this code to show images in Umbraco V3, I got a little curios on why it doesn't work for me. Any settings I might be missing somewhere? //J
|
|
 Rank: Umbracoholic
Joined: 9/8/2006 Posts: 1,831 Location: MA, USA
|
If you have a MediaPicker you'll get the ID. But if you have an Upload control you'll get the path. That's the difference and why the code works for some people and not for others. cheers, doug.
MVP 2007-2009 - Percipient Studios
|
|
|
Guest |