This is a demo site for Downloads Pro based on Quark theme. Throughout the site we have highlighted numerous ways Downloads Pro can be used by either downloads
page types and through [download /]
and [downloads /]
shortcodes.
This skeleton features a Downloads page that we organized in a nested structure, to showcase how you can organize different categories in different Grav pages.
To demonstrate the powerful access level integration with Grav, we created a Protected category page that will require a proper authenticated user in order to be accessed. Additionally, we also included individual protected assets in areas that are public. These assets will require user authentication.
Shortcodes in Downloads Pro serve an important role and provide a powerful mechanism to integrate downloads anywhere on your site, wherever you can place content.
For example, to embed the downloads as we see them in the dedicated Downloads page, we can use the [downloads /]
shortcode with the layout list-folders
.
[downloads route="/downloads" layout="list-folders" /]
Downloads Pro comes with various built-in layouts that can be utilized with your content. Layouts can be also easily created to satisfy any need. More about layouts can be found in the documentation.
This layout renders a button with a customizable title that can be clicked to download the asset. Because it renders as an <A>
tag, this particular layout can be also used inline with your content, if needed.
[download="/downloads/photos/nature/miroslav-skopek-4c82fCful4c-unsplash.jpg" title="Download Nature Photo" layout="button" /]
[download filename="harold-wainwright-Bqip9io1wgg-unsplash.jpg" route="/downloads/photos/urban" title="Download Urban Photo" layout="button" /]
[download filename="/downloads/photos/people/windows-wpIYy2lZ04s-unsplash.jpg" title="Download People Photo" layout="button" /]
The file value has been specified in 3 different ways, they are all equivalent.
The card
layout is a great way to present a download in a modern and appealing way. It can be placed inline, like in this example to blend nicely with your content.
Adding a card to your content can be done through the download
shortcode, as you can see from the sample below:
[download filename="/downloads/photos/nature/miroslav-skopek-4c82fCful4c-unsplash.jpg" layout="card" width="300" /]
Finally, you can also embed a full list of downloads. Downloads Pro provides 2 layouts for this, list
and grid
. By default these layouts will also include the folders' navigation. Most likely this is not something expected when embedding, for that you can use the targeted layout version: list-files
and grid-files
.
Note that the Photos / Urban page, has a protected asset lawless-capture (protected example), which you will only be able by logging in.
An example of a grid layout in use. Which is a replica of the Photos / Urban section of this skeleton.
[downloads route="/downloads/photos/urban" layout="grid-files" width="300" /]
Now let's look at the same Grid example above, this time by using the list-files
layout.
[downloads route="/downloads/photos/urban" layout="list-files" width="300" /]
Name | Size | Downloads | Modified | ||
---|---|---|---|---|---|
hannah-gibbs-VChzTLPcPBA-unsplash.jpg hot | 5.39 MB | 433 | 3 yrs ago | Download | |
harold-wainwright-Bqip9io1wgg-unsplash.jpg featured hot | 6.09 MB | 431 | 3 yrs ago | Download | |
ilya-bronskiy-c8pE6vzV-o8-unsplash.jpg hot | 3.01 MB | 376 | 3 yrs ago | Download | |
mak-M8G--eCHdnY-unsplash.jpg hot | 3.78 MB | 376 | 3 yrs ago | Download | |
tim-hufner-MqWeiOCd6ms-unsplash.jpg hot | 1.17 MB | 392 | 3 yrs ago | Download |