Copied to clipboard

Flag this post as spam?

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


  • Fernando 9 posts 30 karma points
    Oct 08, 2010 @ 20:41
    Fernando
    0

    Macro Container Documentation?

    Hi,

    I recently made the switch from DNN to Umbraco, and I find it to be extremely simple. I’m advancing reasonably fast with my web site, but from time to time, I get stuck in little details (I’ve subscribed for Umbraco TV, but still).

    I’m trying to generate and Address datatype, with chained dropdowns for political division: state, province, district, etc. (Addresses can be from outside the US). I thought of using a Macro Container for this (I guess it might be simpler and lightweight that wrapping a user control), but I can’t find any documentation about it.

    Could you please tell me where can I find the documentation or some samples about the Macro Container?

    Thanks

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Oct 09, 2010 @ 10:59
    Dirk De Grave
    0

    I don't think there's much to say about the macro container. It's just a container to drop one or more (max can be set in developer section) macro's on, change the order of the macro's and that's basically it. 

    You're talking about an address datatype, I assume this is a single user control? In that case, there's no particular case to use the macro container, as you can quite easily drop your macro into a rich text editor field.

     

    Cheers,

    /Dirk

  • Johan Roug 97 posts 153 karma points
    Oct 09, 2010 @ 20:40
    Johan Roug
    0

    Write your XSLT as you would normally do it. The only difference is that to get things out from a macro, lets say you had some aliases (found under pareter on a macro).The aliases could be: source, width, height, number.  In order to get these values out in your xslt, you would write:

    <xsl:variable name="width" select="/macro/source"/>

    <xsl:variable name="width" select="/macro/width"/>

    <xsl:variable name="width" select="/macro/height"/>

    <xsl:variable name="width" select="/macro/number"/>

     

    Also on your template, you would put a refference to your macro field. So if your field is called  "macroContainer", you would write

        <umbraco:Item Field="macroContainer" runat="server"></umbraco:Item>

  • Fernando 9 posts 30 karma points
    Oct 10, 2010 @ 00:45
    Fernando
    0

    Thanks for the answers!

Please Sign in or register to post replies

Write your reply to:

Draft