Copied to clipboard

Flag this post as spam?

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


  • Iain Galloway 6 posts 75 karma points
    Jan 30, 2017 @ 13:06
    Iain Galloway
    0

    Rendering a Macro - the macro appears as comments in browser

    I'm trying insert an iFrame into a webpage, and have discovered a short piece of XSLT code that enables me to set up a macro in order to allow this.

    In the browser I see the following:

    < !UMBRACO_MACRO heightid="360" locationid="https://player.vimeo.com/video/178617772" widthid="640" macroAlias="IFrameInsert" / >

    I've looked online for solutions, and although I'm pretty unfamiliar with Umbraco's insides have read things about:

    • umbraco.library.RenderMacroContent
    • TemplateUtilities.ParseInternalLinks
    • disable-output-escaping="yes"

    ...so the question is, how do I make my macro work and exactly where do I have to put any of this extra code that I might need?

    Thanks in advance Iain

  • Alex Skrypnyk 6163 posts 24143 karma points MVP 8x admin c-trib
    Jan 31, 2017 @ 11:00
    Alex Skrypnyk
    1

    Hi Iain

    Welcome to our Community! You have to create macro in Umbraco backend first of all, get alias and after it insert macro to the page or view.

    Did you create Macro in developers section in Umbraco?

    https://our.umbraco.org/documentation/reference/templating/macros/

    Thanks,

    Oleksandr

  • Iain Galloway 6 posts 75 karma points
    Jan 31, 2017 @ 11:22
    Iain Galloway
    0

    Hi Alex,

    Yes, have created a macro in the devleopers section from the XSLT and aliased according to the article here, http://www.smickus.org/inserting-iframes-with-the-umbraco-cms/#sthash.y9ox7Bus.dpbs

    I've gone through all the steps and get this issue when it renders.

    Any ideas?

    Thanks

  • Alex Skrypnyk 6163 posts 24143 karma points MVP 8x admin c-trib
    Jan 31, 2017 @ 11:33
    Alex Skrypnyk
    1

    Hi Iain

    How did you include the macro to your page?

  • Iain Galloway 6 posts 75 karma points
    Jan 31, 2017 @ 11:46
    Iain Galloway
    0

    Hi,

    From the CMS editor I selected the 'Insert Macro' option and from the dropdown chose the one I'd created. It then asked for parameters of height, width & location.

    These values are visible (as their alias values) in the rendered HTML on the published page although between < and > tags with UMBRACE MACRO inside and the alias values.

    Thanks Iain

  • Iain Galloway 6 posts 75 karma points
    Feb 01, 2017 @ 11:02
    Iain Galloway
    0

    Any more ideas of what might be causing this to happen?

    Cheers Iain

Please Sign in or register to post replies

Write your reply to:

Draft