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.
Display Node Based on 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
This is included in the settings / template
<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,
If You want to work with different languages, you shouldn't use ID of pages, your way is using relative path to pages of current language.
Hi Alex thanks for your reply,
It works well if I pass node id directly but when language changes it does not work.
<umbraco:Macro source="1077" Alias="ListCarouselBlocks" runat="server"></umbraco:Macro> (English Node ID 1077)
else if arabic page
<umbraco:Macro source="1650" Alias="ListCarouselBlocks" runat="server"></umbraco:Macro> (Arabic Node ID 1650)
i have one template only.. i want to pass the source="" according to language
thanks
Hi,
You could write xpath relative to home node,something like that:
<xsl:for-each select="$currentPage/ancestor-or-self::*[parent::root]/*[@nodeType = '1082']">
in this case you get node from your language home page
thanks,
Alex
is working on a reply...