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:
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:
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?
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 :)
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.
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:
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:
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
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 :)
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
is working on a reply...