Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 14 Current »

In My House and My Nearest distances are measured in Kilometres or, if less than 1 Km, in metres. If you wish to display distances displayed in Km also in Miles then you can simply by editing the myNearest_Fields.xsl or myHouse_Fields.xsl.

Open the myNearest_Fields.xsl, which you will find in the following location: D:\Astun\iShare\n.n\WebApps\WebService\xml, in a text editor. Search for "Distance:" which you will find around line 125. If editing MyHouse_Fields you'll see it around line 157.

You need to replace:

with:


Before change
						<p class="atDistance">
							<strong>Distance: </strong>
							<xsl:choose>
								<xsl:when test="$dist > 1000">
									<xsl:value-of select="round($dist div 1000)" />
									km
								</xsl:when>
								<xsl:otherwise>
									<xsl:value-of select="round($dist)" />
									metres
								</xsl:otherwise>
							</xsl:choose>
						</p>
After change
						<p class="atDistance">
							<strong>Distance: </strong>
							<xsl:choose>
								<xsl:when test="$dist > 1000">
									<xsl:value-of select="round($dist div 1000)" />
									<xsl:text> km away (</xsl:text>
									<xsl:value-of select="format-number(round($dist div 1000) div 1.609344, '###,##0.00')" />
									<xsl:text> miles)</xsl:text>
								</xsl:when>
								<xsl:otherwise>
									<xsl:value-of select="round($dist)" />
									metres
								</xsl:otherwise>
							</xsl:choose>
						</p>
BeforeAfter

  • No labels