Copied to clipboard

Flag this post as spam?

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


  • Kevin Schot 5 posts 53 karma points
    Nov 25, 2014 @ 11:14
    Kevin Schot
    0

    Data types as macro parameters

    Hi,

    I've been trying to get data types to work for macro parameters but it feels like I'm stuck again. (using umbraco 7.2.0)

    Right now I'm creating Partial View Macros which I can add to a page using the grid and it works great if it is just a title and an image or something. However, there are also macros that need a RTE, Multi Media Picker or even a color picker. You can create all these data types and use them for document types but for macros you are stuck with the standard textarea, textbox etc.

    There are a few other threads I found that are very similar (Like this and this) but I could never find a solution that was not "try something else". The closest solution I could find was creating a custom property editor and make it available as macro parameter (Nibble and Nibble) but that would mean I'd have to create property editors that are already in there.

    Is there really no way to make these existing property editors or data types available for macros because this is really limiting the way we are using macros and that sucks because the grid is perfect for this.

    Cheers,

    Kevin

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Nov 25, 2014 @ 11:18
    Jan Skovgaard
    0

    Hi Kevin

    Currently the only way is to do it custom I think - there is no way of configuring existing property editors to be used as macro parameters that I know of.

    But perhaps it would be nice to add it as a feature request on the issue tracker?

    /Jan

  • Kevin Schot 5 posts 53 karma points
    Nov 25, 2014 @ 11:45
    Kevin Schot
    0

    Hi Jan,

    Thought so. I added it as a feature request on the issue tracker (http://issues.umbraco.org/issue/U4-5878).

    Can I ask, why are data types not used for macro parameters? In my eyes it makes more sense for something like a color picker to be used in a macro for something like background color.

    Kevin

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Nov 25, 2014 @ 11:51
    Jan Skovgaard
    0

    Hi Kevin

    Sure you can ask - But I'm not the right person to answer I think :) I made a request for this as well a few years ago since we, at my former company, had a scenario where it would make a lot of sense to be able to select a MNTP as a macro parameter.

    But I think that it's because it's something that would be hard to achieve (at leat in version before 7). Don't know if it will be easy to enable in 7.

    But how should it then work? Should it be possible to see a list of all property editor instances installed/created when adding a macro parameter? And what if a 3rd party property editor might not be compatible for some reason etc.?

    I think it's stuff like that and then that there has been focused on many new additions and major features.

    But now there is a feature request, which mean it might be picked up by a volunteer from the community who wants to contribute by making a PR with a fix for this or perhaps it gets so many votes that HQ might consider adding it themselves.

    Hope this helps.

    /Jan

  • Kevin Schot 5 posts 53 karma points
    Nov 25, 2014 @ 12:57
    Kevin Schot
    1

    Hi Jan,

    I think it makes more sense to use the data types instead of the property editors. Let's say we need a multi node picker that can select a node from folder x under the root. You can create a new data type using the already existing property editor so your users will not accidentally pick the wrong node. If I want to do this now I have to create a new property editor for every parameter that selects a node from a different folder.

    But I understand that that might not always be possible so say we still have to use the property editors than it would be nice to at least have the option to make a certain property editor available as parameter editor like you can when you create a custom one.

    Anyway, thanks for your help.

    Kevin

Please Sign in or register to post replies

Write your reply to:

Draft