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 ?
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");
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.
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
Thanks a lot Richard, it worked.
is working on a reply...
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.