Copied to clipboard

Flag this post as spam?

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


  • Nigel Wilson 945 posts 2077 karma points
    Jun 23, 2010 @ 11:41
    Nigel Wilson
    0

    Embed Macro In Rich Text Editor

    I have an XSLT based macro that I would like to be able to use within the Rich Text Editor.

    The macro has 1 parameter which is a media picker.

    I add the macro to the rich text editor and select the respective media item.

    However I am not able to get any output on the page - I cannot even figure out how to get the parameter value to display.

    The rendered HTML within the Rich Text Editor is:

    <div umb_mediafolderid="1079" umb_macroalias="ImageGalleryContent" ismacro="true" onresizestart="return false;" umbversionid="6ddf5204-1e4b-4d33-a66d-b7495038f638" umbpageid="1046" title="This is rendered content from macro" class="umbMacroHolder"><!-- startUmbMacro --><span>This macro does not provides rendering in WYSIWYG editor</span><!-- endUmbMacro --></div>

    My parameter alias is "mediaFolderID" but as you can see above it is changed to umb_mediafolderid.

    Has anyone had similar issues ?

    Thanks

    Nigel

  • Nigel Wilson 945 posts 2077 karma points
    Jun 27, 2010 @ 10:17
    Nigel Wilson
    0

    Bump - has anyone got any ideas please ?

    Nigel

  • Kim Andersen 1447 posts 2197 karma points MVP
    Jun 27, 2010 @ 16:17
    Kim Andersen
    0

    Hi there Nigel.

    To grab the id of the choosen media item, you can do something like this in your ImageGalleryContent.xslt:

    <xsl:variable name="choosenMedia" select="macro/mediaFolderID" />

    This should give you the id in the $choosenMedia-variable.

    To make sure that you have the corect id before moving on, try printing the variable out. In example like this.

    <textarea>
    The choosen media item: <xsl:value-of select="$choosenMedia" />
    </textarea>

    /Kim A

  • 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