I am new to Umbraco CMS. PLease help.
I have a Umbraco website in which I created a DocumentType called 'Master'. The 'Master' page lets user input a goal and amount for a fund raising initiate they are undertaking. On the 'Master' page I have a Macro which automatically does the math to generate a percent that will be used throughout the site. The Macro calls the following 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 am assuming because it is a 'for-each' it is also returning 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 could compare to that it'd help out.
Appreciate the help.