Download list based on a folder in the media section
Hello all you Umbraco-holics :P
I'm hoping that some of you might can help me with a small(read: huge) issue i got. I'm still pretty new to Umbraco and the entire XSLT world.
I got a folder in my media section of my Umbraco site. Inside that folder i got 3 sub-folders, and its within thoose 3 folders i got the files i want to display in the download list. Here's a view of my document structure:
Download
-- Newsletters
---- Newsletter 1
---- Newsletter 2
---- Newsletter 3
-- Pictures
---- Picture 1
---- Picture 2
-- Manuals
---- Manual 1
---- Manual 2
---- Manual 3
What i was to show is:
<h3>Newsletters</h3>
<ul>
<li>Newsletter 1</li>
<li>Newsletter 2</li>
</ul>
<h3>Pictures</h3>
You know what i mean the rest of the way.
But there is 1 more thing. I need to change the display depending on what the parent folder is called. So if its the newsletter list i want 1 kind of display, if its pictures i want another.
I hope you undestand what i mean by all this, and that your able to help me.
The allow 'Newsletter' under 'Newsletter Folder' and allow 'Picture' under 'Picture Folder'
Add two xslt files, when you add them choose the 'List Sub Pages from Current Page' template, place one on your Newsletter folder template and one on your Picture folder template.
Change the your markup in the XSLT depending on which template it's in (basically if it's a picture or newsletter)
You really only need one XSLT file but this will get you started I hope.
Well, i can see where you going with this. But i would be REALLY happy if I could avoid creating a seperate page for each file i want to add to the download list. Thats why i wanted to make it all from the media section of the website. So i could just create a folder, and then add all the items to that folder. Make 1 macro, and put it on the Download page.
Download list based on a folder in the media section
Hello all you Umbraco-holics :P
I'm hoping that some of you might can help me with a small(read: huge) issue i got. I'm still pretty new to Umbraco and the entire XSLT world.
I got a folder in my media section of my Umbraco site. Inside that folder i got 3 sub-folders, and its within thoose 3 folders i got the files i want to display in the download list. Here's a view of my document structure:
Download
-- Newsletters
---- Newsletter 1
---- Newsletter 2
---- Newsletter 3
-- Pictures
---- Picture 1
---- Picture 2
-- Manuals
---- Manual 1
---- Manual 2
---- Manual 3
What i was to show is:
<h3>Newsletters</h3>
<ul>
<li>Newsletter 1</li>
<li>Newsletter 2</li>
</ul>
<h3>Pictures</h3>
You know what i mean the rest of the way.
But there is 1 more thing. I need to change the display depending on what the parent folder is called. So if its the newsletter list i want 1 kind of display, if its pictures i want another.
I hope you undestand what i mean by all this, and that your able to help me.
Regards,
Mark W. Nielsen
Hey Mark,
Make 4 different doctypes:
- Newsletter Folder
- Newsletter
- Picture Folder
- Picture
The allow 'Newsletter' under 'Newsletter Folder' and allow 'Picture' under 'Picture Folder'
Add two xslt files, when you add them choose the 'List Sub Pages from Current Page' template, place one on your Newsletter folder template and one on your Picture folder template.
Change the your markup in the XSLT depending on which template it's in (basically if it's a picture or newsletter)
You really only need one XSLT file but this will get you started I hope.
Rich
Well, i can see where you going with this. But i would be REALLY happy if I could avoid creating a seperate page for each file i want to add to the download list. Thats why i wanted to make it all from the media section of the website. So i could just create a folder, and then add all the items to that folder. Make 1 macro, and put it on the Download page.
Hey Mark,
Sorry, totally misread your post!
I would have a look at this package http://our.umbraco.org/projects/website-utilities/media-iterator and tweak it as you need to.
Regards
Rich
Thats alot Rick! Wan't what i was looking for, but 10% better than what i wanted! :)
is working on a reply...