Exemplo n.º 1
0
        /// <summary>
        /// Gets the macro tag.
        /// </summary>
        /// <returns>The correct syntax for the macro including all parameters</returns>
        public string GetMacroTag()
        {
            string tag = "";

            if (UmbracoSettings.UseAspNetMasterPages)
            {
                tag = "<umbraco:Macro runat=\"server\"";
            }
            else
            {
                tag = "<?UMBRACO_MACRO";
            }
            tag += String.Format(" macroAlias=\"{0}\"", MacroAlias);

            IDictionaryEnumerator ide = ParameterValues.GetEnumerator();

            while (ide.MoveNext())
            {
                tag += String.Format(" {0}=\"{1}\"", ide.Key.ToString(), ide.Value.ToString());
            }

            tag += " />";
            return(tag);
        }