We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 43864
    • 151 Posts
    I'm using the addon FileLister. It's working, but I have some questions:

    1) When working with directories, how to add a "go up one level" link?
    2) How to open dirs in the same windows and files in a new tab/window? In the file-chunk you can either delete target="_blank" or keep it.
    3) I want to check the extension and if it's an image then I would like to show a thumbnail. I tried with a filter in the file-chunk, but that's not working. (if subject=extension then ...)

    Thx for the help.


    UPDATE:
    The second item I solved with some jquery.

        $("td").each(function() {
            if ($(this).hasClass("feo-filename"))
                $(this).find("a").attr('target','_blank');
        });


    The first item I solved also with some jquery and a filter. Not the most elegant solution but it works. If anybody has a better solution, you're welcome.

                        [[!if? &subject=`[[!#get.fd:stripTags]]` &operator=`notempty` &then=`
                        <tr>
                        <td colspan="2"><span onclick="goBack()" style="cursor:pointer;">to higher level</span></td>
                        </tr>
                        `]]
    
    function goBack() {
        window.history.back();
    }
    


    [ed. note: sitsol last edited this post 6 years, 10 months ago.]