Copied to clipboard

Flag this post as spam?

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


  • bob 19 posts 39 karma points
    Jul 05, 2011 @ 01:39
    bob
    0

    Dropdownlist macro parameter

    Hi,

    While I did successfully create a new custom dropdownlist macro parameter, I then encountered the same issue described in this post:

    http://our.umbraco.org/forum/using/ui-questions/2037-dropdown-as-macro-parameter

    i.e. that my new parameter didn't show in the edit window after inserting a macro with this parameter type.

    I can resolve it by renaming the namespace (that has the new type) to be the same as the assembly but this is not desirable.

    I want to develop my Umbraco work in a single web application, which generates a single dll say ProjectName.dll. But of course I may have many namespaces within the project that are compiled into that dll. e.g. ProjectName.Net, ProjectName.Web.UI.WebControls etc, and I want the custom parameter type to be into the namesace ProjectName.Web.UI.WebControls. But it seems to make this work I am forced to put it into a namespace ProjectName.

    Is there no way around this naming issue to get the custom macro parameter to show in the edit macro window?

    Thanks.

  • Mike Chambers 636 posts 1253 karma points c-trib
    Jul 05, 2011 @ 20:11
    Mike Chambers
    0

    did you add your macroparamater to the macroparametertypes table in the database?

  • bob 19 posts 39 karma points
    Jul 06, 2011 @ 05:18
    bob
    0

    Hi,

    Yes I did. My issue is like that described in the post that I reference.

    That is, I can see the new custom parameter in the 'Parameters' tab of the macro in the Developer section. But when I edit the macro from the Content section that parameter is not visible to be edited.

    The problems seems to stem from my type defining the macro parameter is in a namespace that is not the same as the assembly name (which is a fairly normal situation right?). So I can resolve the problem by naming the namespace to be the same as the assembly, but this is not desirable.

  • Tom Fulton 2030 posts 4998 karma points c-trib
    Jul 06, 2011 @ 14:18
    Tom Fulton
    0

    Hi Bob,

    You should be able to use a different namespace from the assembly name on your macro parameters.  I just checked on one of my installs, and I have the following parameter defined:

    macroPropertyTypeRenderAssembly - ClientName.Umbraco
    macroPropertyTypeRenderType - macroParams.buttonPicker

    The assembly file name is ClientName.Umbraco.dll, and the namespace of the parameter type is ClientName.Umbraco.macroParams.

    So it should work, I suspect you might be having a different issue...maybe double check your RenderType namespace is correct?  If I recall it took me some tweaking to figure out the right combination (namespace without the assembly portion).

    -Tom

  • bob 19 posts 39 karma points
    Jul 07, 2011 @ 07:39
    bob
    0

    Hi Tom,

    Thanks for the reply. That did seem to work. It's a little confusing though in that for the RenderType one has to put in not the fully qualified type. Say in your example, the type is ClientName.Umbraco.macroParams.buttonPicker but for the RenderType in the db you only put in macroParams.buttonPicker. So that is a bit confusing. I was entering the fully qualified type and that seems to be why is wasn't working.

    Thanks.

     

Please Sign in or register to post replies

Write your reply to:

Draft