Copied to clipboard

Flag this post as spam?

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


  • Allen Sowles 1 post 21 karma points
    Nov 04, 2009 @ 00:55
    Allen Sowles
    0

    Inserting a Macro into content

    I am very new to Umbraco and just starting to find my way around.  I'm having trouble embedding a flash movie player in a content page.  I started out trying to embed the movie player directly and quickly discovered that the HTML editor would strip out all of my <Script></Script> tags and otherwise disable my code.  I tried using <Embed></Embed> tags and that didn't work well either because if I had multiple flashvars it would change the character "&" to "amp;" and my movie still wouldn't work.

    I read the help, the forums, the wiki etc. regarding macros and I understand now that this is what I need to do.  I followed the instructions for creating a simple xslt macro by going to the developer area, clicking create, creating my xlst (and selecting to create the macro), and the entering my code in the xslt editor.  I can click the Visualize XSLT button and that works like it is supposed to (I see the player and it works).  I edited the macro that was created and clicked the "Show in Editor" checkbox.

    Then I went to my content page, placed my cursor where I wanted the macro inserted and clickd the "Insert Macro" button on the toolbar.  My macro showed up there and I clicked the OK button.  It created the highlighted aread that says this macro contains script and will be rendered at runtime.

    When I view the page, the movie player does not appear.  When I look at the source of the page, I see this:

    <?UMBRACO_MACRO macroAlias="AirTimeWirelessMacro" />

    I am not sure what I am doing wrong and hope that I have missed something simple.  Just to be clear, I am not inserting the macro in a template (I understand what those are), I am trying to insert the macro into a content page using the ToolBar button that says "Insert Macro".  It appears to inject the code, but when I view the page, It doesn't replace this code with the correct html in the rendered page.

    I appreciate any help you can offer.

    Allen

     

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Nov 04, 2009 @ 08:31
    Jan Skovgaard
    0

    Hi Allen

    I think you can do two different things here.

    1: Go to your macro in the developer section and uncheck the "Show In editor" button and make sure that "Use in editor" is checked. Try and see if it works when you do it like that instead.

    2: If step one does not work you could insert the macro in your desired template instead. That should work. The downside to this is of course that you will only be able to place your movie on a certain place on your site.

    Hope that this helps.

    /Jan

  • dandrayne 1138 posts 2262 karma points
    Nov 04, 2009 @ 10:36
    dandrayne
    0
  • Paul Sterling 718 posts 1534 karma points MVP 9x admin c-trib
    Jun 22, 2011 @ 20:19
    Paul Sterling
    0

    Just a test, sorry for the noise.  More testing an Edit.

    -Paul

Please Sign in or register to post replies

Write your reply to:

Draft