Download Manager

Securely share files on the frontend with different method of protection

Back to Download Manager Support

tecnotrade
tecnotrade

Hello, thanks for your work. I'm not able to let it working on the frontend. Using last cms version on php 8.1. I've create 2 main folder. One of them has a subfolder. Every folder has at least 1 file in it. I've created a "download" page (with editor) with downloadManagerBrowser component With just :path in the path option I can see the table but links inside are empty so the page reloads on itself. If I put /download/:path?* inside it I got a "too many redirects error" on the page. Same problem if I create a Snippet and use it inside a CMS page. Can you help? Thanks in advance!

inetis
inetis

Hi,

Thanks for using our plugin.

In your case, you should have the following settings:

  • page URL /download/:path?*
  • Explorer component "path" value: :path

If you open your download.htm file (inside /themes/Your-Theme/pages/) with an external editor it's should look like following:

title = "Files"
layout = "default"
url = "/download/:path?*"

[downloadManagerBrowser]
rootFolder = 0
path = "{{ :path }}"
displaySubFolders = 1
displayTitle = 1
==
{% component 'downloadManagerBrowser' %}

If this problem persists, please post here the "raw" content of your page.

Have a nice day!

tecnotrade
tecnotrade

Love that, it works perfectly! Is there a way to put an "parent folder" link inside the subfolder page?

inetis
inetis

You can try to update to 1.0.8 we just released, we added a "displayBreadcrumb" property that should allow to do this. So the component declaration in your page should look like this :

[downloadManagerBrowser]
rootFolder = 0
path = "{{ :path }}"
displaySubFolders = 1
displayTitle = 0
displayBreadcrumb = 1

Note that if you don't like the current look of the breadcrumb, you can override it in your theme like described here: https://docs.octobercms.com/3.x/cms/themes/components.html#overriding-component-partials

If you want to just have a link to the parent directory instead of the whole breadcrumb, you could do something like this:

{% set parent = __SELF__.parentCategories.last %}

{% if parent %}
    <a href="{{ parent.url }}">{{ parent.name }}</a>
{% endif %}

1-4 of 4