Has anyone attempted trying to automatically knit content and media together by naming convention? I'm thinking a type of "Start node XPath" could do it where it could either evaluate to a folder of specific file.
Ideally i'm thinking something like a start xpath like "/descendant::Folder[@nodeName='MediaFolderName']/File[@nodeName=$currentPage/@nodeName]"
I've also see elsewhere something like ... UmbracoHelper.GetMediaFromXpath("//Folder[@id='" + mediaCompNodeID +"']/competitionsImage") ... but obviously would like things addressed with a nice media context should no direct media be discovered.
Thoughts? Has anyone else felt the need for speed?
Do you mean the Xpath start node option in DAMP 2.0? I've used it a couple of times to select a start node. Don't think that it will work with files. The speed should be ok. It can be heavy the first time the xml is generated for the XPath, but it simply uses librery.GetMedia(id, true) which is cached. In this demo I also use the XPath start node somehwere: http://www.youtube.com/watch?v=LkcObL7CMvQ
XPath usage in Media Selection
Hi all,
Has anyone attempted trying to automatically knit content and media together by naming convention? I'm thinking a type of "Start node XPath" could do it where it could either evaluate to a folder of specific file.
Ideally i'm thinking something like a start xpath like "/descendant::Folder[@nodeName='MediaFolderName']/File[@nodeName=$currentPage/@nodeName]"
I've also see elsewhere something like ... UmbracoHelper.GetMediaFromXpath("//Folder[@id='" + mediaCompNodeID +"']/competitionsImage") ... but obviously would like things addressed with a nice media context should no direct media be discovered.
Thoughts? Has anyone else felt the need for speed?
Do you mean the Xpath start node option in DAMP 2.0? I've used it a couple of times to select a start node. Don't think that it will work with files. The speed should be ok. It can be heavy the first time the xml is generated for the XPath, but it simply uses librery.GetMedia(id, true) which is cached. In this demo I also use the XPath start node somehwere: http://www.youtube.com/watch?v=LkcObL7CMvQ
Jeroen
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.