I am new to Umbraco, I am working on a ASCX file, as we all know it can used as a macro in the templates. But i want to add multiple macros to a single template referring to the same ASCX. Please let me know, can we have any unique property for them...?
If no
Then do we have any API to access the alias name to the current macro...? which can be used in the corresponding ASCX.cs file.
Multiple macros in a template
Hi All,
I am new to Umbraco,
I am working on a ASCX file, as we all know it can used as a macro in the templates.
But i want to add multiple macros to a single template referring to the same ASCX.
Please let me know, can we have any unique property for them...?
If no
Then do we have any API to access the alias name to the current macro...?
which can be used in the corresponding ASCX.cs file.
Hi Amit,
As far as I am aware, there isn't an API call within a Macro to identify itself. (Reflection for Macros - interesting idea though!) :-)
As for giving a Macro a unique property... you could create a macro parameter and then pass that a unique value?
Then in your ASCX, you'd have a public property (called "UniqueProperty" - or whatever) to take that value from the Macro.
Cheers, Lee.
is working on a reply...