I have drawn a blank here (I think because its been so long since I had to do this).
I have an umbraco installation which contains three sites. I want to create a datatype which will be a dropdown of type client.
Type client should be unique to each site.
How can I create a drop down which will take the current node (in the backend) find its home page and then return the children which are of type client?
You can use XPath DropDownList from uComponents for this. It supports setting the dropdown options via an XPath Statement, so you can do something like: $parentPage/ancestor-or-self::SiteHomepage//Client to select only "Client" documents under the current "SiteHomepage" tree.
DocumentType Multi Site Dropdown
Hi guys,
I have drawn a blank here (I think because its been so long since I had to do this).
I have an umbraco installation which contains three sites. I want to create a datatype which will be a dropdown of type client.
Type client should be unique to each site.
How can I create a drop down which will take the current node (in the backend) find its home page and then return the children which are of type client?
Thanks
S
Hi SinkyPars,
You could use the uComponents XPath DropDownList datatype, and configure it with an XPath expression like:
or (if using the lastest build)
HTH,
Hendy
Hi,
You can use XPath DropDownList from uComponents for this. It supports setting the dropdown options via an XPath Statement, so you can do something like: $parentPage/ancestor-or-self::SiteHomepage//Client to select only "Client" documents under the current "SiteHomepage" tree.
Hope this helps,
Tom
You're getting quicker, Hendy :)
Great guys thanks!"
S
Ah, doesnt seem to work so I tried this:
$currentPage/ancestor-or-self::*[@isDoc and name() = 'Homepage']/descendent::*[@isDoc and name() = 'Client']
But I still get:
:S
Any ideas why?
Thanks
S
Hi SinkyPars,
Is the current node published ?
Does it work if you test on the doctype alias rather than the node name ?
(the datatype will definitely do what you want)
Cheers,
Hendy
I think descendant is spelled wrong? (e instead of i) ?
-Tom
Oh yeah, oops ! well spotted :)
Could avoid having to remember how to spell 'descendant' using Toms example above.
is working on a reply...