0
votes

In Umbraco 6.1, I need to add a field to a Document Type that gets it's possible values from a list that an admin user can add to via the back end.

I figured I'd do this by creating a Developer/Data Type of type XPath DropDownList and have that point to a folder in my Umbraco content through the XPath Expression //Configuration/lookup-lists/course-availability. I've set the Type of Document and Value to Node Id/

This drop down list isn't displaying the SimpleTextItems that are within this folder (its empty).

Any ideas?

2

2 Answers

0
votes

I believe you're looking to select content from a specific folder in your content-tree, is this correct? Look into the Multi-Node Tree Picker in this case as you can configure this pick 1-n nodes in any specific folder or type..

If the above is not what you're looking for, you might also check the uComponents dropdown that an admin with access to the Developer section can edit the 'pre-values'.

Whatever you're looking for exactly - some data type in the uComponents package is most likely the answer. If not (u'd be surprised!), you may have to code your own .

0
votes

Your XPath is incorrect.

your Xpath should be something like (loads all existing documents with doctype:SimpleText and in first level of Umbraco tree)

$ancestorOrSelf/ancestor-or-self::*[@level=1]/SimpleText

Please take a look at here to see correct Xpath samples for your dropdownlist