How to get the ID of an document? Options
Guillaume
Posted: Friday, August 29, 2008 11:16:56 AM
Rank: Newbie

Joined: 8/28/2008
Posts: 19
Location: Guernsey
Hello,
That is a very "noobie" question i gues but i couldnt find the answer anywhere..

How can i get the id of a specific document?

So that i can display it with:

Code:
<xsl:value-of select="umbraco.library:GetXmlNodeById($id)/data [@alias='title']"/>
Dirk
Posted: Friday, August 29, 2008 11:34:12 AM

Rank: Addict

Joined: 9/27/2007
Posts: 977
Location: Belgium
Hi Guillaume,

Could you be a bit more specific on the context? Don't really know what you're after here!

If you just after the id of a document in the tree, just hover over it and look at the left bottom of the browser, should show the id of your document. Or, open up that document, and the id should be listed on the 'Properties' tab.

Hope that helps.

Regards,
/Dirk




level 1 certified - umbraco blog at netaddicts.be - working on an integrated forum4umbraco
Guillaume
Posted: Friday, August 29, 2008 11:54:20 AM
Rank: Newbie

Joined: 8/28/2008
Posts: 19
Location: Guernsey
Hey thanks, that was exactly what i was looking for!
Great!
Guillaume
Posted: Friday, August 29, 2008 1:06:36 PM
Rank: Newbie

Joined: 8/28/2008
Posts: 19
Location: Guernsey
Hello, me again!

Thanks, every new tool gives me new ideas...
I want to do a "for-each" command with two filters:

1. one is the Node ID
2. one is a variable check

The first one is OK but I can't get the variable check working. I am sure that it's a syntax problem, could somebody give me a hint?

Code:
<xsl:for-each select="umbraco.library:GetXmlNodeById(1056)/ancestor-or-self::node[@level=1]/descendant::node [@nodeTypeAlias = 'wwNews' and data [@alias = 'venueLocation'] = 'place1']"
>
Dirk
Posted: Friday, August 29, 2008 1:27:49 PM

Rank: Addict

Joined: 9/27/2007
Posts: 977
Location: Belgium
Hi,

Is place1 the variable? Or not?

Give this a try:

Code:
<xsl:variable name="place1" select="'WhateverPlace'"/>


and

Code:
<xsl:for-each select="umbraco.library:GetXmlNodeById(1056)/ancestor-or-self::node[@level=1]/descendant::node [@nodeTypeAlias = 'wwNews' and data [@alias = 'venueLocation'] = $place1]"
>


Mind the quotes in select="'WhateverPlace'"!!

Hope that helps.

Regards,
/Dirk


level 1 certified - umbraco blog at netaddicts.be - working on an integrated forum4umbraco
Guillaume
Posted: Friday, August 29, 2008 4:17:58 PM
Rank: Newbie

Joined: 8/28/2008
Posts: 19
Location: Guernsey
Ok perfect, i am starting to like umbraco now :p
Thank you for your quick and usefull help!

Regards,
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.