Copied to clipboard

Flag this post as spam?

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


  • Lachlann 344 posts 626 karma points
    Mar 31, 2011 @ 23:01
    Lachlann
    0

    invalid id when using macro to pass in ID

    Hey all,

    I have the sign up working fine when i hard code the mil chimp list ide into th emacro call, however when i try and is an umbraco item or a macro to insert the value into the mail chimp macro call i get an invalid list id.

    If output the umbraco item straight to the page it shows the correct mail chimp id.

    I have tried stripping white space but to no avale.

     

    any suggestions would be great!

     

    L

     

     

     

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Apr 01, 2011 @ 08:15
    Jan Skovgaard
    0

    Hi Lachlann

    How do you try to pass the value to the macro? And where do you get the value from?

    /Jan

  • Lachlann 344 posts 626 karma points
    Apr 02, 2011 @ 13:06
    Lachlann
    0

    Thanks for your reply,

    The value if set on the home page document type and i use the macro to recursibly look up the tree and retrieve it like so:

     <xsl:value-of select="$currentPage/ancestor-or-self::*[./newsletterID!=''][1]/newsletterID"/>

    this returns the expected value when rendered in the master page. To pass it into the Mail chimp macro i do the following:

     <umbraco:Macro Alias="MailChimp4UmbracoSubscribeExtended"
                    MailChimpListId="<umbraco:Macro Alias='MailChimpID' runat='server'/>" 
                    runat
    ="server"></umbraco:Macro>

    I have also tried using an umbraco item set to recursive to retrieve the id but this has not worked either, I was wondering
    whether white space could be an issue?

     

    L

     

  • Lachlann 344 posts 626 karma points
    Apr 02, 2011 @ 21:04
    Lachlann
    1

    Ahh figured it out well found this page which told me how to do it!

     

    http://our.umbraco.org/wiki/reference/templates/umbracomacro-element/macro-parameters/advanced-macro-parameter-syntax

     

    thanks jan

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Apr 03, 2011 @ 00:47
    Jan Skovgaard
    0

    Hi Lachlann

    Good to hear you found the solution :-)

    /Jan

Please Sign in or register to post replies

Write your reply to:

Draft