Gems: Insert an image without using XSLT Options
Adz
Posted: Thursday, June 05, 2008 8:06:47 PM

Rank: Aficionado

Joined: 6/5/2008
Posts: 128
Location: United Kingdom
Guys,

At CodeGarden we were shown how to insert an image, without using XSLT.

But, I cannot seem to get it to work at home! My notes suggested this:

<img src='<umbraco:Item field="myImage" runat="server"></umbraco:Item>' />

Which does not work; I must have missed something out!

Did anyone take better notes?


Thanks,


Ad

Adam Perry (blog, twitter), developing Umbraco based websites and applications for ConnectDigital.
jesper
Posted: Thursday, June 05, 2008 8:22:07 PM

Rank: Administration

Joined: 7/25/2006
Posts: 414
Location: vipperoed, denmark
Adz wrote:
Guys,

At CodeGarden we were shown how to insert an image, without using XSLT.

But, I cannot seem to get it to work at home! My notes suggested this:

<img src='<umbraco:Item field="myImage" runat="server"></umbraco:Item>' />

Which does not work; I must have missed something out!

Did anyone take better notes?


Thanks,


Ad



I havent tried it yet and I didnt take notes so my advise might be inaccurate. You're missing a parameter called NodeId. Try different casing if it doesnt work. Use it to specify from which node you expect to find the field.

Jesper


webbureau jesper.com doing webdesign / development / umbraco implementations / 2007&2008 MVP
mortenbock
Posted: Thursday, June 05, 2008 10:41:14 PM

Rank: Addict

Joined: 7/19/2006
Posts: 752
Location: Århus, Denmark
I just tested this, and it works perfectly (In 4.0 Beta)

<img src='<umbraco:Item field="umbracoFile" nodeid="1072" runat="server"></umbraco:Item>' />

Morten Bock - Level 2 certified - MVP 2008/2009 - My danish blog with a few english posts

dawoe
Posted: Friday, June 06, 2008 11:11:22 AM

Rank: Aficionado

Joined: 1/19/2008
Posts: 162
Location: Belgium
mortenbock wrote:
I just tested this, and it works perfectly (In 4.0 Beta)


This is the second time I see 4.0 mentioned here. Did I miss the 3.1 release ???
Is this beta public ?

Converting a DotNetNuke site to Umbraco : Follow it here
mortenbock
Posted: Friday, June 06, 2008 4:16:19 PM

Rank: Addict

Joined: 7/19/2006
Posts: 752
Location: Århus, Denmark
The 4.0 Beta was released at Codegarden. I'm guessing there will be public info about it soon. I think the decision is to set 3.1 = 4.0 which will be the last version in this generation of Umbraco, meaning that the breaking changes (refactoring and so on) will be postponed for v5.0.

Morten Bock - Level 2 certified - MVP 2008/2009 - My danish blog with a few english posts

Adz
Posted: Friday, June 20, 2008 9:44:34 PM

Rank: Aficionado

Joined: 6/5/2008
Posts: 128
Location: United Kingdom
mortenbock wrote:
I just tested this, and it works perfectly (In 4.0 Beta)

<img src='<umbraco:Item field="umbracoFile" nodeid="1072" runat="server"></umbraco:Item>' />


Thanks very much!!

Adam Perry (blog, twitter), developing Umbraco based websites and applications for ConnectDigital.
drobar
Posted: Friday, June 20, 2008 10:22:03 PM

Rank: Umbracoholic

Joined: 9/8/2006
Posts: 1,541
Location: KY, USA
@Dave, you can get the information regarding 3.1=4.0, as well as the roadmap and how to get your hands on it at http://www.umbraco.org/blog/2008/6/12/umbraco-4-announced-at-codegarden (see the comments, especially) and
http://umbraco.org/umbraco-4---get-excited/milestones

cheers,
doug.

MVP 2007-2009 - Official Umbraco Trainer for North America - Percipient Studios
Petr Snobelt
Posted: Monday, June 23, 2008 9:36:57 AM
Rank: Aficionado

Joined: 10/2/2007
Posts: 160
Location: Czech Republic
When you have file in page properites you can use this
<?UMBRACO_GETITEM field="file" insertTextBefore="&lt;img src=&quot;" insertTextAfter="&quot; alt=&quot;pic&quot; /&gt;"/>

Petr
Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.