But i thought it would be easier to get help if i took the specific problem out and made a seperate thread.
In the meantime ive fixed many bugs etc, but one thing i just cant wrap my head around is, is xpath.
The rotator mentioned in the post i linked to above, is used on three pages: -The main front page, the one visitors first see when they open the website -Main page of two seperate sub sections
The same rotator is used in all three places, and i need to somehow check in the xslt, if the rotator is on the front page, or a sub section. the reason for this is, it displays featured articles, so the document template has two booleans that determines if its featured on the front page or a sub section.
Thank you for your reply, the "level" looks exactly like what i need. But regardless of where i put the "when" it gives off and error, either theres and error with the tag placement or it cant be a child of a "div" element which the xslt is ridden with. The code is linked to in my original post above.
If you have a suggestion as to where would be hte most logical choice to use it, i would be most grateful, in the meantime i will try and experiment.
Hi, did you enclose the <xsl:when> in the <xsl:choose> like above? Can you paste the code you added for some context? You should be able to use it just about anywhere..
Checking if xslt is on specific page, xpath problem perhaps?
This is a problem from the topic i made here:
http://our.umbraco.org/forum/developers/xslt/23187-Help-tidying-up-and-fixing-errors-with-a-List-Rotator'
But i thought it would be easier to get help if i took the specific problem out and made a seperate thread.
In the meantime ive fixed many bugs etc, but one thing i just cant wrap my head around is, is xpath.
The rotator mentioned in the post i linked to above, is used on three pages:
-The main front page, the one visitors first see when they open the website
-Main page of two seperate sub sections
-Main (rotator here)
--Sub-section1 (rotator here)
----blabla
--Sub-section2 (rotator here)
----blabla
The same rotator is used in all three places, and i need to somehow check in the xslt, if the rotator is on the front page, or a sub section. the reason for this is, it displays featured articles, so the document template has two booleans that determines if its featured on the front page or a sub section.
Hi Frederik,
The best way is probably to check by the Document Type, assuming they are different, or by the level.
-Tom
Thank you for your reply, the "level" looks exactly like what i need. But regardless of where i put the "when" it gives off and error, either theres and error with the tag placement or it cant be a child of a "div" element which the xslt is ridden with. The code is linked to in my original post above.
If you have a suggestion as to where would be hte most logical choice to use it, i would be most grateful, in the meantime i will try and experiment.
Hi, did you enclose the <xsl:when> in the <xsl:choose> like above? Can you paste the code you added for some context? You should be able to use it just about anywhere..
-Tom
Ok, this is strange, i did what you said to begin with, but it didnt work regardless of how, now i tried again after your post and it works.
But god is it ugly :p, the code was ugly to begin with, now there is the exact same code in both "when" just checking for a different boolean.
Oh well, it works, i will return to it when i know about xsl:template, thank you very much again :)
is working on a reply...