Copied to clipboard

Flag this post as spam?

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


  • Kyle Skrinak 272 posts 327 karma points
    Apr 10, 2012 @ 16:30
    Kyle Skrinak
    0

    Placing an umbraco macro alias from within a 'textbox multiple'

    If I place an umb_macroalias statement within a textbox multiple, the page renders fine, but validators don't like : there is no attribute "umb_macroalias" <div umb_macroalias="MostRecentBlogPosts" ismacro="true" onresizestart="r… or there is no attribute "ismacro" …roalias="MostRecentBlogPosts" ismacro="true" onresizestart="return false;" umb…

    etc.

    So, how can I include this macro without failing validation?

  • Kyle Skrinak 272 posts 327 karma points
    Apr 11, 2012 @ 16:05
    Kyle Skrinak
    0

    By "validator" I meant the W3C validation service.

    So this is not possible?

  • Peter Gregory 408 posts 1614 karma points MVP 3x admin c-trib
    Apr 18, 2012 @ 00:43
    Peter Gregory
    1

    Hi Kyle

    To put a macro into a Textbox Multiple you will need to use a slightly different macro tag syntax (its actaully a very old syntax).

    <?UMBRACO_MACRO macroAlias="MostRecentBlogPosts" numberOfItems="3"></?UMBRACO_MACRO>

    If you use this your macro should render in your template :)

    Peter

  • Peter Gregory 408 posts 1614 karma points MVP 3x admin c-trib
    Apr 18, 2012 @ 00:44
    Peter Gregory
    1

    If you get save errors you will need to html encode the chars.

  • Kyle Skrinak 272 posts 327 karma points
    Apr 18, 2012 @ 12:59
    Kyle Skrinak
    0

    I'm not doing something correctly.

    Here is the original macro call:

    <div umb_macroalias="MostRecentBlogPosts" ismacro="true" onresizestart="return false;" umbversionid="8fe22984-3835-474c-97e7-0460f929cd5d" umbpageid="1060" title="This is rendered content from macro" class="umbMacroHolder">
    <!-- startUmbMacro --><!-- endUmbMacro -->
    <umbraco:Macro Alias="UmbBlogMostRecentPost" runat="server"></umbraco:Macro>       </div>

    That's actually TWO macro calls; no? I deleted the first (non-working) macro call, and the non-valid code no longer renders. The second call works great.

    That fixed it; much thanks for your help!

Please Sign in or register to post replies

Write your reply to:

Draft