I'm new to umbraco and XSL. I watched the video's on umbraco.tv but i still have questions about XSLT. I hope someone here can help me how to do the following:
I've got an website structure which looks for example like this:
I want that when i visit the Product Category 1 page i see al the Product Items who are in Product Category 1 as an thumbnail.
Can somebody tell me how i do this with xslt?
Question 2,
In the document type 'Product Item' I created a tab with 2 properties, image and thumbnails which both are a media picker. Is this the right way to do?
Welcome to umbraco.
I'm seeing you're on the right track... just need some xslt and you're set ;)
If you're on a 'Product Category' page, all you need is a simple xslt file that will iterate the child nodes from the current page.
I'm sure there's a template already available for this ('List Pages From Current Page') which you'll need to adapt to include support for listing images and thumbnails.
Code snippet for getting the filename of the image...
[code]
[/code]
(Need to replace 'AliasOfMediaPicker' with the alias of the media picker...)
Thanks alot for you're help. I created the following XSLT file but it gives an error.
I don't see what i'm doing wrong.
Another question is am I doing it right that when I want to make a product document type that I created a tab with 2 properties, image and thumbnails which and that they are both a media picker.
Should get the ID of the image picked via the media picker, and
Should get the image from the media library when the ID is passed in, so I'm not sure of the need for adding the _thumb as long as imagenamethumb.jpg is in the library.
Listing products thumbnails
Hi guys,
I'm new to umbraco and XSL. I watched the video's on umbraco.tv but i still have questions about XSLT. I hope someone here can help me how to do the following:
I've got an website structure which looks for example like this:
- Home
-- About us
-- Products
-+- Product Category 1
-+-+ Product item 1
-+-+ Product item 2
-+-+ Product item 3
-+- Product Category 2
-+-+ Product item 1
I want that when i visit the Product Category 1 page i see al the Product Items who are in Product Category 1 as an thumbnail.
Can somebody tell me how i do this with xslt?
Question 2,
In the document type 'Product Item' I created a tab with 2 properties, image and thumbnails which both are a media picker. Is this the right way to do?
Hi Loekos,
Welcome to umbraco.
I'm seeing you're on the right track... just need some xslt and you're set ;)
If you're on a 'Product Category' page, all you need is a simple xslt file that will iterate the child nodes from the current page.
I'm sure there's a template already available for this ('List Pages From Current Page') which you'll need to adapt to include support for listing images and thumbnails.
Code snippet for getting the filename of the image...
[code]
[/code]
(Need to replace 'AliasOfMediaPicker' with the alias of the media picker...)
Hope this helps.
Regards,
/Dirk
Hi Dirk,
Thanks alot for you're help. I created the following XSLT file but it gives an error.
I don't see what i'm doing wrong.
Another question is am I doing it right that when I want to make a product document type that I created a tab with 2 properties, image and thumbnails which and that they are both a media picker.
Looks about right, but try using current() to access the node currently being accessed within the loop?
e.g.
Hi guys,
thanks for this, it was the current() statement.
The only thing what isn't working i want to get the thumbnail
my code is now like this:
[code]
I'm not sure about the
, '.', 'thumb.jpg')
So I may not be able to help, but
current()/data [@alias = 'productAfbeelding']
Should get the ID of the image picked via the media picker, and
Should get the image from the media library when the ID is passed in, so I'm not sure of the need for adding the _thumb as long as imagenamethumb.jpg is in the library.
WHat error message are you getting?
Dan
is working on a reply...