• fileLister Addon Template#

  • allen875 Reply #1, 10 months ago

    Reply
    Hello,

    I'm trying to find a good template design for my downloads page using the fileLister addon but I can't seem to find anything online nor here on the forums. Does anybody have a design they would like to share, please include a screenshot if possible.

    Thanks


  • Mark Hamstra - MODX Complete Team Reply #2, 9 months, 4 weeks ago

    Reply
    Not sure if anyone has a nice design ready for this (tho who knows - been surprised before), but it's quite easy to style it the way you want it using the &fileTpl and &directoryTpl properties, which you pass the name of a chunk to use.

    Could find a design anywhere on the interwebs and integrate that using those chunks


  • apcherry Reply #3, 9 months, 4 weeks ago

    Reply
    What sort of files are you listing and what do call a good template?

    I won't claim to have a "nice design" but it suits my site. I've set up a very simple system, on my site I post a few articles and some of them have downloads specific to that article. So I have a simple listing in a side panel.

    My filelister call is

    <h3>Downloads:</h3>
    [[!FileLister?
    &path=`assets/downloads/[[*id]]/`
    &showDownloads=`1`
    &uniqueDownloads=`0`]]
    [[+files]]


    Then in the filelister properties I point the fileTpl property to a modified file chunk.

    <div class="fd-file">
    <img src="assets/templates/clanRev/filetypes/[[+extension]].png"> 
    [[+link]]
    <span class="fdexp-info"> ([[+filesize]] [[+showDownloads:notempty=`, [[+showDownloads]])`]]</span>
     </div>


    So if I create a new article, lets say it's given a resource id of 63, then if I create a directory assets/downloads/63 then anything placed in that directory will automatically appear in the download listing for that page.

    for example http://cherryclan.com/scale7/workbench/sprungbuffers.html , see attached image.

    Is that what you were after or are you trying to achieve something different?


  • allen875 Reply #4, 9 months, 3 weeks ago

    Reply
    Thanks for the replies, apcherry thats not exactly what I'm going for that a very interesting implementation of the plugin. I will have to keep that in mind for the future
    Something along the lines of the screenshot they use for the fileLister plugin would do just fine I think.