I need help with xslt. I am trying to use an xslt-file to display an image an my page. The Template calls a macro, that calls the xslt-file. The xslt loops through the content in the node and displays it on the page. I can get text with no problems, but the images are not working.
Thank you again. This time no error when trying to save, but it still doesn't work though. I am thinking I havent been precise enough in my description. I have a node e.g. front page, that I want to display underlying nodes, without showing them in navigation. This way the underlying nodes becomes sections of the front page.
like this:
-frontpage -sektion -sektion -sektion
The front page calls the macro, that calls the xslt-file. The xslt-file looks at the underlying pages and displays the data from each node.
The xslt is derived from one of the standard navigational ones. The xslt is below.
The net result is that the closing div for ForsideBilledBoks (frontpagepicturebox) disappears in output. The text parts are there, but the missing div screws up the layout. Also the image is not displayed. Is this because the mediapicker is actually a part of the subnode and not the calling node?
using media picker with xslt
I need help with xslt. I am trying to use an xslt-file to display an image an my page. The Template calls a macro, that calls the xslt-file.
The xslt loops through the content in the node and displays it on the page. I can get text with no problems, but the images are not working.
My xsl for the image is like this:
This displays the node id, right where the image is supposed to be. I know this is a newbie question, but how do I get the image from the id?
Regards
Kim
Try this:
thank you for the quick reply. This results in this error:
Any ideas, why this is so?
Kim
Try this:
Thank you again. This time no error when trying to save, but it still doesn't work though. I am thinking I havent been precise enough in my description. I have a node e.g. front page, that I want to display underlying nodes, without showing them in navigation. This way the underlying nodes becomes sections of the front page.
like this:
-frontpage
-sektion
-sektion
-sektion
The front page calls the macro, that calls the xslt-file. The xslt-file looks at the underlying pages and displays the data from each node.
The xslt is derived from one of the standard navigational ones. The xslt is below.
The net result is that the closing div for ForsideBilledBoks (frontpagepicturebox) disappears in output. The text parts are there, but the missing div screws up the layout. Also the image is not displayed. Is this because the mediapicker is actually a part of the subnode and not the calling node?
Here's the template for the calling node:
The dummyflash is not important now. One step at the time.
The content is from the subnode like this:
Tab: sektionsindhold
Search for a regular expression
Search for a regular expression
Search for a regular expression
Tab: Generic Properties
Search for a regular expression
And finally. The important pant of the rendered layout is her:
If you have read this far - thank you
Kim
Ahh - the documenttype parts didnt make it in the post. Here goes in plain text:
Tab: sektionsindhold
billedvælger (billedvælger), Type: Media Picker
Edit "billedvælger"
Overskrift (overskrift), Type: Textstring
Edit "Overskrift"
Edit "TekstIndhold"
Tab: Generic Properties
Skjult side (umbracoNaviHide), Type: True/false
Edit "Skjult side"
Kim
Hi again
Have solved the part with the missing closing div tag, but still havent got the image.
Moved the beginning and closing div inside the test, so now it doesnt get rendered, along with the image -that still isnt rendered either.
No ideas anyone?
Kim
If you are looping through the nodes, remove the $currentPage parameter in front.
Thank you. This pointed me in the right direction. The final solution became like this:
I am still not sure why this solution works and everything else doesn't.
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.