String Writer

my tech stuffs…

Archive for January 2012

Get TcmId from web dav url

leave a comment »

Many of tridion developer would have tried to get tcm id from web dav. This might be one of the common scenarios where we are using web dav when we are rendering embedded components (in another component template).

I think this is simple scenario so I’m just sharing C# code snippet for this. I’m posting this snippet becoz somebody was googling this yesterday ;) ))


IdentifiableObject identifiableObject = engine.GetObject("<<Web dav url>>");
package.PushItem("TCMID", package.CreateStringItem(ContentType.Text, identifiableObject.Id));

Written by visvabalaji

January 10, 2012 at 5:52 pm

Posted in SourceCode, Tridion

Tagged with ,

Follow

Get every new post delivered to your Inbox.