Copied to clipboard

Flag this post as spam?

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


  • Björn 18 posts 158 karma points
    Jan 24, 2018 @ 14:48
    Björn
    0

    Macro parameter configuration

    I would like to configure the content picker macro parameter data type by setting a root node. I know it isn't possible out of the box but is it possible to use the source code from the content picker to build your own content picker and set a root node? The reason why I want to set a root node is because I've seperated the blurbs into different tamplates and folders:

    enter image description here

    If I then want to use for example an image blurb in the Umbraco Grid, I choose macro -> Image blurb and then the content picker is displayed. However, when I choose a content node I can choose from the entire content tree:

    enter image description here

    enter image description here

    enter image description here

    This will mess it up the site if I don't choose an image blurb. Is there a way to set a start node for that content picker so after I'm clicking "Add" in the content picker I'm directly in folder with Image-blurbs? Or is it possible to set what kind of content that should be allowed? Or maybe there is a better way to achieve what I want to do?

    Kind regards /Björn

  • Søren Kottal 702 posts 4497 karma points MVP 5x c-trib
    Jan 24, 2018 @ 21:12
    Søren Kottal
    100

    Hi Björn

    Check out this package I made: https://our.umbraco.org/projects/developer-tools/parameter-editor-generator/

    It lets you generate a parameter editor (it's a preconfigured property editor) based on a data type in your solution.

    That way, you can use a content picker with a set root node in your macros. Or nested content, grid, or whatever wonderful editor you'd like to use in a macro :)

  • Björn 18 posts 158 karma points
    Jan 25, 2018 @ 08:13
    Björn
    0

    Awesome, exactly what I wanted. Thank you very much. It seems a little unstable though. The "Generate Parameter Editor" option isn't always there and sometimes when it was shown the field where you can adjust the package.manifest field and everything else wasn't shown. I was able to try it a bit though and understood that if a want a new parameter editor I can just create a new folder and a new package.manifest file and adjust what I want.

    /Björn

Please Sign in or register to post replies

Write your reply to:

Draft