Copied to clipboard

Flag this post as spam?

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


  • Chad Rosenthal 272 posts 474 karma points
    Jan 04, 2010 @ 15:36
    Chad Rosenthal
    0

    Add new parameter types to Macros

    I've seen a bunch of information on how to add  new data types to be used in Document Types, but I'm having a hard time finding out if there is a way to add a new Type to the Parameters list of a Macro. 

    Basically, I'm trying to 'idiot' proof a membership control. Right now the control is set-up to receive a string that has the membership types and membership groups that the new user should be assigned to. Since this might be different with every install, it needs to be passed in to the control. Yet, having it passed as a string creates the additional potential that they will enter the information in incorrectly. I'm aware that developers could still screw it up when they are editting the template, but it would still be much easier if they could see a multi-select box with all of the available Membership Groups and Membership Types. 

    Thanks,
    Chad

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Jan 04, 2010 @ 16:06
    Dirk De Grave
    3

    Hi Chad,

    you'd need to code a class that implements IMacroGuiRendering interface which lives in the... interfaces assembly. If you need to have an example, have a look at the core source code (folder components\macroRenderings)

     

    Hope this helps.

    Regards,

    /Dirk

  • Chad Rosenthal 272 posts 474 karma points
    Jan 04, 2010 @ 17:13
    Chad Rosenthal
    0

    Thanks for the assist. I'll give it a look.

  • Richard Soeteman 4049 posts 12922 karma points MVP 2x
    Jan 04, 2010 @ 18:06
    Richard Soeteman
    0

    I'm currently writing a blogpost + wiki with an example for this. will publish it tonight.

  • Richard Soeteman 4049 posts 12922 karma points MVP 2x
    Jan 04, 2010 @ 22:41
    Richard Soeteman
    4

    Just published a blogpost about this topic

  • Chad Rosenthal 272 posts 474 karma points
    Jan 05, 2010 @ 02:01
    Chad Rosenthal
    0

    Awesome blogpost. Now I'm saddened that I already closed the solution.

  • Richard Soeteman 4049 posts 12922 karma points MVP 2x
    Jan 05, 2010 @ 11:21
    Richard Soeteman
    0

    Thanks and no worries about that.

  • Markus Johansson 1938 posts 5866 karma points MVP 2x c-trib
    Dec 05, 2012 @ 22:45
    Markus Johansson
    0

    Richard, I tried your code and it seams that, when you have inserted the macro and then reopen the settings the dropdown doesn't get set to the right value.

    It turns out that the Set method of the Value property is called before the Load-method of the DDL. So I stored the value in a private string and the assigned it to the ddl after the foreach.

    // M

  • Chris Doig 2 posts 21 karma points
    Mar 11, 2014 @ 13:54
    Chris Doig
    0

    Hi Markus,

    I know it has been a while since you posted about the bug with value not being set correctly but I am having the same issue. When you say you store the value in a private string, where do you get the value to store as I cant see this in my code?

    Thanks

Please Sign in or register to post replies

Write your reply to:

Draft