Ghosting and Solutions header image

Ghosting and Solutions

Ever spend time trying to figure out why your nice and shiny solution file didn’t return any errors but still isn’t showing the changes you made to your masterpage or pagelayout? Last week i actually spend way to much time doing that, due to the fact that someone uploaded his masterpage to the masterpage gallery, without using the solution; thus wrecking my solution since SharePoint sets a little marker to that page, telling it that its ‘ghosted’. ...

XSLT and currency header image

XSLT and currency

Just some simple code this time, a minor XSLT function to change values to a nice Currency Value. Like it says, it formats a number (some var names are Dutch, sorry for that): <xsl:template name="FormatNumber"> <xsl:param name="str" /> <xsl:param name="defnadekomma" /> <xsl:variable name="newvalueS" select="string($str)"/> <xsl:value-of name="newvalue"> <xsl:if test="contains($newvalueS,',')"> <xsl:select="substring-before($newvalueS, ',')"/> <xsl:select="$newvalueS"/> </xsl:if> <xsl:variable name="nadekomma"> <xsl:if test="contains($newvalueS,',')"> <xsl:select="concat(',',substring-after($newvalueS,','))"/> <xsl:variable name="nadekommaMax"> </xsl:if> <xsl:if test="string-length($nadekomma)> 3"> <xsl:select="substring($nadekomma,1, 3)"/> <xsl:select="$defnadekomma"/> </xsl:if> <xsl:if test="string-length($newvalue)> 3"> <xsl:variable name="newvaluews"> <xsl:select="substring($newvalue,1,string-length($newvalue) – 3)"/> <xsl:select="substring($newvalue,string-length($newvalue) – 2,3)"/> <xsl:select="concat($newvaluews,$nadekommaMax)"/> <xsl:select="concat($newvalue, $nadekommaMax)"/> </xsl:variable> </xsl:if> € <xsl:variable name="FormatNumber"> <xsl:variable name="str" select="$prijs"/> <xsl:variable name="defnadekomma"select="',-'"/> </xsl:template>