I have a "Main site Layout" Doc type, and some content sub pages.
On the layout doc type I have an imagepicker to pick a logo.
On the frontpage which uses the main doctype itself works flavless, but when I Click on a content sub page I just get Error parsing XSLT file: \xslt\ImgGen.xslt
Not sure where the error is, but if it's some xslt related then here is the code:
[quote]
[/quote]
Not sure wether or not the disable-output-escaping should be there, just thought it might be the solution, but no.
[quote=fdo]When it works fine on the main (front) page, it's usually the url thats wrong.
What about:
[/quote]
Hi
I have tried your line, but the same.
And I don't think the error is about the url, because then it would display the redcross'ed picture here instead of a picture I get the text "Error parsing XSLT file: \xslt\ImgGen.xslt"
When you are on the main page your xslt works fine because $currentPage has a data item with the alias that you are passing in. When you go onto a sub page of a different doctype then that alias no longer exists so $currentPage/data [@alias=$imgAlias] doesn't return anything.
If you use the ancestor-or-self notation then it will still check the current page (so it will still work on the main page) and it will also check the parent page. The extra checks ensure that the closest ancestor node with a value present is returned.
Have a look at this post for a great explanation of the recursive display technique:
Macro not working on sub nodes
I have a "Main site Layout" Doc type, and some content sub pages.
On the layout doc type I have an imagepicker to pick a logo.
On the frontpage which uses the main doctype itself works flavless, but when I Click on a content sub page I just get Error parsing XSLT file: \xslt\ImgGen.xslt
Not sure where the error is, but if it's some xslt related then here is the code:
[quote]
[/quote]
Not sure wether or not the disable-output-escaping should be there, just thought it might be the solution, but no.
Why do I get an error on the sub pages?
/Lars Mortensen
When it works fine on the main (front) page, it's usually the url thats wrong.
What about:
[quote=fdo]When it works fine on the main (front) page, it's usually the url thats wrong.
What about:
[/quote]
Hi
I have tried your line, but the same.
And I don't think the error is about the url, because then it would display the redcross'ed picture here instead of a picture I get the text "Error parsing XSLT file: \xslt\ImgGen.xslt"
Look here: Working page / front page
And here: Non working / sub page.
Any other thoughts?
/Lars
Try replacing:
with
When you are on the main page your xslt works fine because $currentPage has a data item with the alias that you are passing in. When you go onto a sub page of a different doctype then that alias no longer exists so $currentPage/data [@alias=$imgAlias] doesn't return anything.
If you use the ancestor-or-self notation then it will still check the current page (so it will still work on the main page) and it will also check the parent page. The extra checks ensure that the closest ancestor node with a value present is returned.
Have a look at this post for a great explanation of the recursive display technique:
http://forum.umbraco.org/yaf_postst2751_XSLT-Tip--Display-a-field-recursively.aspx
Cheers,
Kev
is working on a reply...