XSLT for page redirection based up on the language
I have one site with English and arabic in asp.net . I done it using umbraco . It working fine. But the problem is when i click on the image of arabic page it going to english decription page. I want to redirect it in to arabic of decription page. based up on the language selection it go it corresponding page. Please help me to sort it out. I know it is problem in my XSLT.
Are you sure that the xml you get back from the $source parameter is the one for the arabian site?
If so...have you setup unique hostnames on each root node of the site? (Homepage nodes) and set the <useDomainPrefixes>true</useDomainPrefixes> in the /config/umbracoSettings.config.
(I'd be surprised if this is the issue though, since the source should really be unique when using the nodepicker).
I have one site with English and arabic in asp.net . I done it using umbraco . It working fine. But the problem is when i click on the image of arabic page it going to english decription page. I want to redirect it in to arabic of decription page. based up on the language selection it go it corresponding page. Please help me to sort it out. I know it is problem in my XSLT.
XSLT for page redirection based up on the language
I have one site with English and arabic in asp.net . I done it using umbraco . It working fine. But the problem is when i click on the image of arabic page it going to english decription page. I want to redirect it in to arabic of decription page. based up on the language selection it go it corresponding page. Please help me to sort it out. I know it is problem in my XSLT.
In my template
I have one macro included
<umbraco:Macro source="[#pageID]" Alias="ListCarouselBlocks" runat="server"></umbraco:Macro>
xslt
<xsl:variable name="source" select="/macro/source"/>
<xsl:template match="/">
<!-- The fun starts here -->
<ul>
<xsl:for-each select="umbraco.library:GetXmlNodeById($source)/* [@isDoc and string(umbracoNaviHide) != '1']">
<li><a href="{umbraco.library:NiceUrl(@id)}">
<img height="156" width="220">
<xsl:attribute name="src"><xsl:value-of select="carouselImage"/></xsl:attribute>
</img>
</a></li>
</xsl:for-each>
</ul>
</xsl:template>
Hi Mo
Are you sure that the xml you get back from the $source parameter is the one for the arabian site?
If so...have you setup unique hostnames on each root node of the site? (Homepage nodes) and set the <useDomainPrefixes>true</useDomainPrefixes> in the /config/umbracoSettings.config.
(I'd be surprised if this is the issue though, since the source should really be unique when using the nodepicker).
Hope this helps.
/Jan
Hi we have the similiar problem.
I have one site with English and arabic in asp.net . I done it using umbraco . It working fine. But the problem is when i click on the image of arabic page it going to english decription page. I want to redirect it in to arabic of decription page. based up on the language selection it go it corresponding page. Please help me to sort it out. I know it is problem in my XSLT.
In my template
I have one macro included
<umbraco:Macro source="[#pageID]" Alias="ListCarouselBlocks" runat="server"></umbraco:Macro>
#pageID should print the id for example the page is research its id is 1077 this page is in 2 nodes /en node and /ar node.
xslt
<xsl:variable name="source" select="/macro/source"/>
<xsl:template match="/">
<!-- The fun starts here -->
<ul>
<xsl:for-each select="umbraco.library:GetXmlNodeById($source)/* [@isDoc and string(umbracoNaviHide) != '1']">
<li><a href="{umbraco.library:NiceUrl(@id)}">
<img height="156" width="220">
<xsl:attribute name="src"><xsl:value-of select="carouselImage"/></xsl:attribute>
</img>
</a></li>
</xsl:for-each>
</ul>
</xsl:template>
hi the nodes already configured below..
<useDomainPrefixes>true</useDomainPrefixes> in the /config/umbracoSettings.config.
I want to pass to nodeid contionally tht is
if the current page is english then
<umbraco:Macro source="1077" Alias="ListCarouselBlocks" runat="server"></umbraco:Macro>
else if arabic page
<umbraco:Macro source="1650" Alias="ListCarouselBlocks" runat="server"></umbraco:Macro>
Please send me the script code to apply my template
is working on a reply...