Introduction
There are 7 types of layout (Categories, Subcategories, Category, Downloads, Download Details, Summary and Search).
For each type only one layout may be selected as active. Each Layout has, in principle, two sections. One section has the header, subheader and footer sub-sections and the other section has the before, main and after sub-sections. So the view on the screen uses the appropriate section from the available active layouts.
One of the key aspects of layouts are the 'placerholders'. These are like small "plugins" or "macros" that generate the relevant code. They appear in layout code enclosed in braces: { and }. For instance the placeholder {category_listbox} generates the code that will show a pulldown list of all the categories and sucategories.
Also please note that not every placeholder is available in every type of layout. When you open a layout in the back end then each section has an
If you click on a layout type such as for example Presently there are nine different Download type layouts.
Note that the layouts in this instance have 'Files' in the name rather than 'Downloads' - this is a hangover from the earliest versions of jDownloads. It was considered by the development team that it would have been too much of an onerous task for users to have to reselect layouts with new names - so we still have 'files' in the names.

Each Download layout has two main sections, the
The Main Area is itself has three sections: 'Use Before Layout', 'Main Layout' and 'Use After Layout'. In this example there is no code in the 'Use Before Layout' or the 'Use After Layout'.
Main area
It has three areas: 'Use Before Layout', the 'Main Layout' itself and the 'Use After Layout'. As noted above, in this example the 'Use Before Layout' and the 'User After Layout' are both empty.
Also notice the



It shows if it is a default layout, that is whether or not the layout is part of the jDownloads installation. Also whether this layout is the current Active layout of this type.
There is also a facility to load in two additional popular CSS framework files to allow additional classes and the like for 'own' styling.
Please note if you do plan to modify an existing layout always make a copy first by using the
button and then modify that new one. If the Title of the original one was say "Standard Files Layout without Checkboxes 3.9" then the copy will be "Standard Files Layout without Checkboxes 3.9 (2)". You may of course change the Title.
There is also a description box where you can add details about the layout. This description will appear on the main layout panel in the backend.
Placeholders
The Downloads type layouts have by far the largest number of placeholders. The example below shows the placeholders available in the main area. In general one would not use placeholders in the before and after areas.



Before looking in detail at the layout anatomy it is useful to first see a typical view showing Downloads.
The image opposite shows an example view of the contents of a single category.
The active Downloads layout is "Compact Files Layout 3.9".

In the code fragments you will also see lines like
Header
The correspondance between the code and the view on the screen is evident.


Subheading
The Navigation only shows if there are more Downloads than the value in the


Main
The top line of the Download view has various icons, a title and the download button. Underneath those is a tag.
Then there is some description on the left and an image on the right.
As previously the code may readily be related to the view because of the names of the CSS classes and the placeholders.
In this example there were no 'ratings' in use and also the Download was not 'featured' so those sections of code generate no output.
For more information on making a Download featured see Featuring a Download (opens in a new window/tab).


The Next section of the Download view is the information section.
Although in this compact view it is only one line, the actual code to generate the view is quite extensive.
Each placeholder is shown on a seperate line in the code to make it simpler to understand.
One of the most frequent reasons for making a copy of the layout and then editing the copy is to change which placeholders are more appropriate for your site.




The last section of the main part is the preview. This will show either a video or an audio, of if there is no preview then nothing is shown.
The code is basically just one line. The placeholder {preview} uses the file extension of the preview file to determine which type of player to show.
The other placeholder {mp3_id3_tag} will only show for mp3 type previews.
.png)
.png)
Footer
It shows the back link button and the navigation if in
.png)
.png)
ColinM February 2020 modified July 2023, May 2025
