I need to somehow use the translate() function on the call. How can I do this? Every time i try i get an error opening the xslt. Any help would be greatly appreciated
You should move the 2 variables to the top (lcletters and ucletters), place them just below the output method.
Then, do the translate on your pageTitle.
The error was probably because you tried to use a variable which was not known at that point yet.
... or you could use the Exslt.ExsltStrings:lowercase() and similar uppercase()
library function. You can see available extensions if you click "Insert value-of" button, and click the "Get Extensions" button.
[quote=PeterD]You should move the 2 variables to the top (lcletters and ucletters), place them just below the output method.
Then, do the translate on your pageTitle.
The error was probably because you tried to use a variable which was not known at that point yet.
HTH,
PeterD[/quote]
How can I call the translate on the value of the pagetitle?
This question has branched into two different questions, actually - AFAIK the original question was something that was easier (and probably more 'correct' in markup terms) to use CSS for, e.g. when you want a headline in all caps.
The second question (added today) is actually something different - wanting to add a valid classname that's derived from the @nodeName (or pageName), which there can be perfectly valid reasons to.
In all cases - this thread should really be closed, so we don't end up with multiple differing questions ...
Convert uppercase letters to lower case...
I need to convert my uppercase letters to lowercase, here is my xslt so far:
]>
<>
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxml="urn:schemas-microsoft-com:xslt"
xmlns:umbraco.library="urn:umbraco.library"
exclude-result-prefixes="msxml umbraco.library">
I need to somehow use the translate() function on the call. How can I do this? Every time i try i get an error opening the xslt. Any help would be greatly appreciated
You should move the 2 variables to the top (lcletters and ucletters), place them just below the output method.
Then, do the translate on your pageTitle.
The error was probably because you tried to use a variable which was not known at that point yet.
HTH,
PeterD
... or you could use the Exslt.ExsltStrings:lowercase() and similar uppercase()
library function. You can see available extensions if you click "Insert value-of" button, and click the "Get Extensions" button.
[quote=PeterD]You should move the 2 variables to the top (lcletters and ucletters), place them just below the output method.
Then, do the translate on your pageTitle.
The error was probably because you tried to use a variable which was not known at that point yet.
HTH,
PeterD[/quote]
How can I call the translate on the value of the pagetitle?
Isn't easyest use css text-transform ;-)
Petr
I also want to do this to convert the page title to lowercase and replace spaces with dashed to create a class for the page.
i.e. Our Products
to <div class="our-products">...
Hi Rich,
There's an attribute you can use for that - the @urlName is very good for classname/ids, e.g.:
/Chriztian
Why are you doing this in XSLT?
Why don't you create a new class in CSS:
or call the class in jQuery
This question has branched into two different questions, actually - AFAIK the original question was something that was easier (and probably more 'correct' in markup terms) to use CSS for, e.g. when you want a headline in all caps.
The second question (added today) is actually something different - wanting to add a valid classname that's derived from the @nodeName (or pageName), which there can be perfectly valid reasons to.
In all cases - this thread should really be closed, so we don't end up with multiple differing questions ...
/Chriztian
is working on a reply...