Copied to clipboard

Flag this post as spam?

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


  • tarekahf 215 posts 153 karma points
    Mar 21, 2010 @ 12:05
    tarekahf
    1

    Passing Dictionary Items as Parameters to User Control/Macro embeded in Ritch Text Field.

    I have created a User Control with Parameters as Private Properties. The Parameters are something like the following:

    1. Title Header (Enter Search Parameters)

    2. Search Field 1 Caption (ID)

    3. Search Field 2 Caption (Name)

    4. Search Field 3 Caption (Doctor Name)

    5. Search Field 4 Caption (Request Date)

    When I inserted the Macro (User Control) inside in a Ritch Text Field in a Document, I was able to specifiy the Macro Parameter Values. It worked successfully.

    But, I would like to use Dictionary Items to pass the Paramter Values instead. When I specify the Dictionary Item Name like "#TitleText", the parameter is passed as "#TitleText", I mean it is not replaced with the value of the Dictionary Items.

    How I can pass Dictinary Items as Parameters to the Macro when it is inserted in a RTF in a Document ?

    Tarek.

  • Richard Soeteman 4054 posts 12927 karma points MVP 3x
    Mar 22, 2010 @ 09:04
    Richard Soeteman
    3

    Hi Tarek,

    I think you can't pass dictionary items to your macro. What you can do is pass the name of the dictionary item and retrieve the value in your usercontrol using umbraco.library.GetDictionaryItem("The passed key");

    Cheers,

    Richard

  • tarekahf 215 posts 153 karma points
    Mar 22, 2010 @ 23:26
    tarekahf
    0

    Thanks a lot Richard, it worked.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies