Copied to clipboard

Flag this post as spam?

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


  • Eddie Foreman 215 posts 288 karma points
    Dec 22, 2011 @ 00:32
    Eddie Foreman
    0

    Point in the right direction

    Hi All,

    Looking for some advice

    I have a usercontrol that has 3 text parameters, that I would like to be editable in Umbraco.  I can do this with three text string inputs in a document type and then pass the values onto the usercontrol  with an xslt using macro parameters.  However, what I would like to achive is to have a macro that is inserted into the tiny mce via the insert macro button in the tool bar.  Then when the macro is selected the editor can then enter the required values for each input. Then once saved each input value is passed to the usercontrol on the published page.  And so is displayed in the same location as entered in the tiny mce editor. I.e. In between two blocks of text

    So I guess my questions are:

    1. Do I use another user control for the user input - looked at the usercontrol datawrapper.  But wasn't sure if I could use this in a macro or the tiny mce editor.
    2. Once the user has saved and published their input.  How do I pass these input values to the usercontrol.
    3. Is it possible to retain the users input.   So that if they decide to edit the values, the input fields are populated with their previous values .

    Not sure if these points are covered in Umbraco TV.

    Thanks,
    Eddie

  • Markus Johansson 1936 posts 5864 karma points MVP 2x c-trib
    Dec 22, 2011 @ 07:52
    Markus Johansson
    0

    Hi Eddie!

    If you are able to use your macro in one of your templates theres only some small changes to put them in the Richtext editor as well.

    1. Make sure that your three parameters are added as parameters of the macro. Go to Developer/Macros, click your macro, then the parameters-tab and add the parameters that you are using in your code.

    2. Activate the macro for use in the editor by going back to the "Macro Properties"-tab and check the "Use in editor"-checkbox.

    3. From what I know thats not possible right now. Anyone else?

     

     

Please Sign in or register to post replies

Write your reply to:

Draft