How to create a custom data type drop down list with child pages/nodes
First time using Umbraco so please excuse me if this is a stupid thing to ask, but here's my scenario.
I am currently working on a site which has a careers page and within the careers page are child pages for each current job opportunity. Now in the back end of the careers page I wish to have a drop down list of all of the current child pages (jobs) so that the user can select a page as a featured job.
I would create a new data type (on the developer tab) for 'Job Picker' use property editor of 'Content Picker', set the start node of the job picker to be the careers page. Then add a new property for the job picker to the Document Type of Careers Page - this should then show the drop down on the careers page for the user to select.
Thanks for your help that worked exactly as you described it. My next question is, how could I use this as a macro instead? When creating a macro and adding a parameter you only get the default data types in the type drop down and not the newly created ones.
How to create a custom data type drop down list with child pages/nodes
First time using Umbraco so please excuse me if this is a stupid thing to ask, but here's my scenario.
I am currently working on a site which has a careers page and within the careers page are child pages for each current job opportunity. Now in the back end of the careers page I wish to have a drop down list of all of the current child pages (jobs) so that the user can select a page as a featured job.
I hope this makes sense : )
Hi Kerry,
Welcome!
I would create a new data type (on the developer tab) for 'Job Picker' use property editor of 'Content Picker', set the start node of the job picker to be the careers page. Then add a new property for the job picker to the Document Type of Careers Page - this should then show the drop down on the careers page for the user to select.
Kerri
Hi Kerri
Thanks for your help that worked exactly as you described it. My next question is, how could I use this as a macro instead? When creating a macro and adding a parameter you only get the default data types in the type drop down and not the newly created ones.
Hi Kerry,
It appears that isn't as straight forward, if you've C# and database knowledge try this article:
https://our.umbraco.org/documentation/extending/macro-parameter-editors/
Other have been asking about having this as a feature see: https://our.umbraco.org/forum/umbraco-7/using-umbraco-7/59294-Data-types-as-macro-parameters
A related feature request has been raised here http://issues.umbraco.org/issue/U4-6032
Kerri
Lots of good links. Here's another I happened across yesterday in the Angular Workbook (shows how to make a property editor a parameter editor, aka macro parameter editor): https://github.com/umbraco/AngularWorkbook/blob/master/Exercises/Exercise10.md
is working on a reply...