Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Kerry Moran 4 posts 84 karma points
    Nov 04, 2015 @ 11:06
    Kerry Moran
    0

    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 : )

  • Kerri Mallinson 113 posts 497 karma points
    Nov 04, 2015 @ 12:19
    Kerri Mallinson
    100

    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

  • Kerry Moran 4 posts 84 karma points
    Nov 04, 2015 @ 14:27
    Kerry Moran
    0

    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.

  • Kerri Mallinson 113 posts 497 karma points
    Nov 05, 2015 @ 16:51
    Kerri Mallinson
    1

    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

  • Nicholas Westby 2054 posts 7103 karma points c-trib
    Nov 05, 2015 @ 17:18
    Nicholas Westby
    0

    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

Please Sign in or register to post replies

Write your reply to:

Draft