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?
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.
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:
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
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
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>
Thanks for the answers!
is working on a reply...