I am doing a simple test for checking that Macro parameters are correctly parsed in my Umbraco 4.0.3 installation. Problem is no matter how many tests i do, macro parameter is never parsed.
I am supposed to get following text as a result of use the macro: "Value of parameter is: Prueba". Fact is am getting nothing and that is driving me crazy.
What am i doing wrong? Maybe my Umbraco installation is not working properly?
Are you getting nothing at all or are you getting just "Value of parameter is:" with no "Prueba" value? in other words is the macro being called or not at all?
Please Help!! XSLT Parameter is driving me crazy
Hi.
I am doing a simple test for checking that Macro parameters are correctly parsed in my Umbraco 4.0.3 installation.
Problem is no matter how many tests i do, macro parameter is never parsed.
XSLT Code (Prueba.xslt)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp " "> ]>
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxml="urn:schemas-microsoft-com:xslt"
xmlns:umbraco.library="urn:umbraco.library" xmlns:Exslt.ExsltCommon="urn:Exslt.ExsltCommon" xmlns:Exslt.ExsltDatesAndTimes="urn:Exslt.ExsltDatesAndTimes" xmlns:Exslt.ExsltMath="urn:Exslt.ExsltMath" xmlns:Exslt.ExsltRegularExpressions="urn:Exslt.ExsltRegularExpressions" xmlns:Exslt.ExsltStrings="urn:Exslt.ExsltStrings" xmlns:Exslt.ExsltSets="urn:Exslt.ExsltSets"
exclude-result-prefixes="msxml umbraco.library Exslt.ExsltCommon Exslt.ExsltDatesAndTimes Exslt.ExsltMath Exslt.ExsltRegularExpressions Exslt.ExsltStrings Exslt.ExsltSets ">
<xsl:output method="xml" omit-xml-declaration="yes"/>
<xsl:param name="currentPage"/>
<xsl:variable name="parametro" select="/macro/parametro"/>
<xsl:template match="/">
Value of parameter is: <xsl:copy-of select="/macro/parametro"/>
<br />
Value of parameter is: <xsl:value-of select="$parametro"/>
</xsl:template>
</xsl:stylesheet>
Macro Prueba (Alias = Prueba, use Prueba.xslt as xslt file) parameters defined
Alias (parametro) Name (parametro) Type (text)
Macro used in testing template
<%@ Master Language="C#" MasterPageFile="/umbraco/masterpages/default.master" AutoEventWireup="true" %>
<asp:Content ContentPlaceHolderID="ContentPlaceHolderDefault" runat="server">
<umbraco:Macro parametro="'Prueba'" Alias="Prueba" runat="server"></umbraco:Macro>
</asp:Content>
Results
I am supposed to get following text as a result of use the macro: "Value of parameter is: Prueba".
Fact is am getting nothing and that is driving me crazy.
What am i doing wrong? Maybe my Umbraco installation is not working properly?
Thanks a lot for your Help!!
Ivan
Are you getting nothing at all or are you getting just "Value of parameter is:" with no "Prueba" value? in other words is the macro being called or not at all?
Have you declared the parameters in the macro under "Devloper" - "Macros" - "The name of your macro" - Parameters tab ?
Thanks a lot guys!! My code was ok. Reinstalling Umbraco fixed the problem.
is working on a reply...