I am new to Umbraco CMS. Help PLease.
I have a Umbraco website in which I created a DocumentType called "Wizard". The Wizard page allows the user to enter a goal and amount to initiate the fundraising that they take. On the Master page, I have a macro that automatically does the math to generate a percentage that will be used throughout the site. The macro calls the next XSLT
<xsl:for-each select="$currentPage/ancestor-or-self::*">
<xsl:variable name="amount" select="* [@alias = 'FundraisingCurrentAmount']"/>
<xsl:variable name="goal" select="* [@alias = 'FundraisingGoal']"/>
<xsl:variable name="percentage" select="$amount div $goal * 100"/>
<xsl:value-of select="$percentage"/>
</xsl:for-each>
This works, but I assume it is "for everyone", it also returns two NaN results. How can I rewrite this (a) cleaner and (b) so that it works better.
I understand ASP.NET Webforms, so if you can compare with what this will help.
Rate the help.