Combo Box with list of article inside the umbraco editor
Hi all,
inside the editor i need to put a combobox that contain a list of article's group so the user that write the page content can select the group of the article.
i try to explain better.
i've a "folder" that contain a list of group.
when the user create a new article, he can select the related group.
the combo have to display the group title and have the value of the group id.
when the user save the new article i need to save also the group id and if the user select the article i ve to select the correct related group.
Check out the XPath DropDownList datatype from uComponents. This allows you to have a DropDownList that populates from nodes elsewhere in your site. You can give it an XPath expression to find your "Group" nodes, such as $ancestorOrSelf/ancestor-or-self::Home/ArticleGroups/ArticleGroup
This can store the ID or Name of the selected node.
Also if you want to have articles tied to multiple groups I would reccomend using MultiNode Tree Picker instead.
Combo Box with list of article inside the umbraco editor
Hi all,
inside the editor i need to put a combobox that contain a list of article's group so the user that write the page content can select the group of the article.
i try to explain better.
i've a "folder" that contain a list of group.
when the user create a new article, he can select the related group.
the combo have to display the group title and have the value of the group id.
when the user save the new article i need to save also the group id and if the user select the article i ve to select the correct related group.
is it possible? can u help me? a tutorial?
thank you
nico
Hi Nico,
Check out the XPath DropDownList datatype from uComponents. This allows you to have a DropDownList that populates from nodes elsewhere in your site. You can give it an XPath expression to find your "Group" nodes, such as $ancestorOrSelf/ancestor-or-self::Home/ArticleGroups/ArticleGroup
This can store the ID or Name of the selected node.
Also if you want to have articles tied to multiple groups I would reccomend using MultiNode Tree Picker instead.
Hope this helps,
Tom
thank you!!! this is exactly what i need! :):)
just one last question:
in the content page i have:
Content
- Pharmaretail
- ArticleGroup
- Group1
- Group2
-....
what i've to write in the XPath Expression to obtain the Group1, Group2....?
thank you
nico
Hi,
It depends on where the Articles exist, since that's where the XPath will start.
But something like this should work:
Replacing the following....
Home - DocTypeAlias of your 'Pharmaretail' page
ArticleGroup = DocTypeAlias of your 'ArticleGroup' page
Group = DocTypeAlias of your 'Group1', 'Group2' pages.
-Tom
WOW now all work fine!
really thanks
nico
is working on a reply...