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.
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)
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.
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?
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
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
Thanks for the assist. I'll give it a look.
I'm currently writing a blogpost + wiki with an example for this. will publish it tonight.
Just published a blogpost about this topic
Awesome blogpost. Now I'm saddened that I already closed the solution.
Thanks and no worries about that.
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
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
is working on a reply...