We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Plugin: List Contents

Development and Programming

Paul Frost (orienteer)'s avatar
Paul Frost (orienteer)
389 posts
16 years ago
Paul Frost (orienteer)'s avatar Paul Frost (orienteer)

Is there any way to sort the order in which they are displayed?

It looks random and I can’t work out the sequence to influence it. It doesn’t seem to be alpha, date or file type.

I’m not a PHP guru to be able to hack the plugin code without help.

       
Brad Street's avatar
Brad Street
239 posts
16 years ago
Brad Street's avatar Brad Street

Paul,

Updated the plugin per your request to now accept a sort parameter, such as sort=”asc” for ascending or sort=”desc” for descending. If the sort parameter isn’t passed, it will display links in the same order as they are within the folder.

The updated file is available via link in the first post of this thread.

Enjoy!

       
Paul Frost (orienteer)'s avatar
Paul Frost (orienteer)
389 posts
16 years ago
Paul Frost (orienteer)'s avatar Paul Frost (orienteer)

Thank you very much.

I never cease to be amazed by the EE community and it’s support. Only 3 hours after I made a request and a modified version is posted!

I’ve uploaded the new version and it’s working perfectly.

Listening to your music as I type this, I like it!

       
Brad Street's avatar
Brad Street
239 posts
16 years ago
Brad Street's avatar Brad Street

Thanks for using the plugin and your kind comments about my music. Glad you found the module useful. I too am always impressed by the community surrounding EE.

This plugin was my first attempt at enhancing EE, and hadn’t been touched in quite some time. Needless to say, I ended up rewriting the code for this when I had a chance to open it up and look at it again. Anyways, happy to help. Let me know if you think of any other ways to make this plugin better.

       
E P Alton's avatar
E P Alton
55 posts
16 years ago
E P Alton's avatar E P Alton

Great plugin! Thank you so much.

Would be great if it could handle nested folders somehow. Or take an “if” statement to apply the appropriate icon to files (for PDF versus JPEG, etc.)–although there might already be a way to do this one, I just now started playing with it.

Again, thanks! The EE community is amazing.

       
Paul Frost (orienteer)'s avatar
Paul Frost (orienteer)
389 posts
16 years ago
Paul Frost (orienteer)'s avatar Paul Frost (orienteer)

The icon bit is easy, add this to your css and repeat for each file type

a[href$=".pdf"] {
background: url(path to icons../pdf.gif) no-repeat right top;
padding-right: 18px;}
       
Brad Street's avatar
Brad Street
239 posts
16 years ago
Brad Street's avatar Brad Street

I haven’t really given any thought to nested folders - but will add it to the “todo” list.

       
1 2

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.