Unfortunately, that isn't possible directly from XSLT. You would need to use the umbraco API for that.
umbraco.library.UnPublishSingleNode(sender.Id);
This means you would either need to use a .net macro, or you could create an xslt extension (easy to do) to perform the action for you and then call that extension function from your xslt macro.
Creating a user control would be overkill here, as you'd write the same code in a small class xslt extension library. Latter doesn't need a user control, but will need some configuration to get it working.
A good intro on xslt extensions can be found in the wiki... hmm, thought I'd find one there, but couldn't... and search isn't helping me much... but there's 3 free minutes in this video that may help
how i can unpublish a content doxument by xsl?
how i can unpublish a content doxument by xsl?
Unfortunately, that isn't possible directly from XSLT. You would need to use the umbraco API for that.
This means you would either need to use a .net macro, or you could create an xslt extension (easy to do) to perform the action for you and then call that extension function from your xslt macro.
cheers,
doug.
So i need to create a user control and send the id of the document that i want unpublish.
in user control use this "umbraco.library.UnPublishSingleNode(sender.Id);" with id of the document
right?
thanks and sorry for the english..
Bruno,
Creating a user control would be overkill here, as you'd write the same code in a small class xslt extension library. Latter doesn't need a user control, but will need some configuration to get it working.
A good intro on xslt extensions can be found in the wiki... hmm, thought I'd find one there, but couldn't... and search isn't helping me much... but there's 3 free minutes in this video that may help
Cheers,
/Dirk
is working on a reply...