I'm working on a site for a car dealer, and the cars will be put in one folder when they are for sale, but when they are sold, they are moved into a doctype called "ProduktgruppeSolgt".
When browsing a car on such page, I need to substitute the price with a text saying it has been sold.
It is the second line below that I cant figure out.
One way you should be able to include a xslt file into another, is by using the import tag or the include tag. Chriztian Steinmeier writes some articles about it here. And comes with some examples on the use.
As Dennis is saying above you should look into include or import XSLT files and I must admit it's not often that you will need to render XSLT files inside each other. Be aware though that if you're using a XSLT based macro to render content from a rich text editor (in which you can insert a xslt based macro) you will need to use the umbraco.library:RenderMacro() extension otherwise the content of the XSLT based macro will not render.
Test parent node
Hi.
I'm working on a site for a car dealer, and the cars will be put in one folder when they are for sale, but when they are sold, they are moved into a doctype called "ProduktgruppeSolgt".
When browsing a car on such page, I need to substitute the price with a text saying it has been sold.
It is the second line below that I cant figure out.
Thanks in advance!
Best regards
Stefan
Hi Stefan
you should probably use $currentPage/parent::ProduktgruppeSolgt instead?
/Jan
Thank you - I knew it was related to the syntax I was trying to use...
Also, how can I test if $currentPage is a certain doctype?
One more thing, how can I easily render a macro from within another xslt file?
Hi Stefan,
You should be able to test the if currentPage certain documentype, with something like this:
One way you should be able to include a xslt file into another, is by using the import tag or the include tag. Chriztian Steinmeier writes some articles about it here. And comes with some examples on the use.
http://pimpmyxslt.com/articles/include-or-import/.
Hope it´s helps you.
/Dennis
Hi Stefan
As Dennis is saying above you should look into include or import XSLT files and I must admit it's not often that you will need to render XSLT files inside each other. Be aware though that if you're using a XSLT based macro to render content from a rich text editor (in which you can insert a xslt based macro) you will need to use the umbraco.library:RenderMacro() extension otherwise the content of the XSLT based macro will not render.
Hope this answers your question :)
/Jan
Thank you very much for your help!
I will look into the links provided :)
And a happy New Year to you!
Hi Stefan
You're welcome.
And a very happy new year to you! :)
/Jan
Hi Stefan,
Happy new year to you :) and to Jan too :)
/Dennis
is working on a reply...