Tree Module -June 2023

Navigation in a graphical tree form.

The 'Tree' module shows the jDownloads Categories in a tree like scheme.  It gives a visual representation of the category organisation.

As illustrated later the view may be arranged to include or exclude certain branches or part of a branch of the tree.

Menu requirement

In order for the Tree module, and anything else in jDownloads, to work properly it is essential to have the jDownloads menu item 'List All Categories'.  Details on creating such a menu item are given in the article Menus - Overview and Details (opens in a new window/tab).

However in some situations you may wish to hide that menu item. 'Hiding' a menu item is a standard Joomla! facility and how to hide a menu item is briefly described below.

jDownloads always requires  a menu item type 'List All Categories', either hidden or active, to function correctly.

Hiding a menu item

Assuming you have created a 'List All Categories' menu item then find it in the relevant menu and click on its title.

Select the V4 tab link type tab and find the setting 'Display in Menu' and set to No, then V4 button save close.

When you return to the list of menu items you will see that it is now hidden.
tree23tree22V4 menu item listAllCats hidden

Configuring Tree module


To configure the Tree Module go to V4 button system and click on V4 button site modules in the V4 manage section section. Then scroll down and click on V4 jdownloads treewich opens the V4 tab module tab as illustrated opposite.

Ensure that the Status is set to Published.

In many of the examples used in this article the following Options were set to Yes:
Display number of Subcategories
Display number of Downloads
View zero values?
View Tooltip?
V4 module setup01
Next select the V4 tab menu assignment tab and ensure the Module Assignment' option is set to 'On all pages' as illustrated opposite.V4 menu assignment all pages

General

The initial Public view using the default module setup is typically as shown in the first picture opposite.

It lists all the Top Level Categories that are pubically available, including Uncategorised.

Clicking on the Tree plus symbol expands the branch as illustrated in the far right picture.  Clicking on the tree minus collapses that branch.

Note: If it also shows the V4 overview link link, as in the views opposite, then that indicates that no 'exclude' or 'include' Categories selection is active.

Tree01Tree01A
The only Categories shown when a user is not logged in are those that have Public or Guest View Access Level.

After logging in then the module shows all of the categories for which the user group has view access.

In this example the category LoggedOnDownloads appears after logging in.

If partway down a branch a Category becomes 'invisible' because of a change in View Access Level then the branch will stop at that point.
Tree02

Show Number of Subcats and Downloads


The picture opposite shows the effect of enabling the 'Display number of Subcategories' and 'Display number of Downloads' options.

There is also an option where you can 'display zeros' to show there are no sub categories or Downloads which has also been enabled.

The 'round' brakets, ( ), denote number of sub categories and 'square' brackets, [ ].  denote the number of Downloads in the current and subsequent subcategories.

Note that the links are active. Clicking on category 'zip files' for example will show the contents of that category in the main view area as illustrated on th image at the far right..
Tree03V4 link to zip downloads

The module also has an option to show tooltips for the number of sub categories and number of Downloads by moving the cursor over the relevant value.

This is helpful as not everyone will remember the meaning of the different type of 'bracket'.
V4 hint categoryV4 hint downloads

Limit Depth Shown

For sites with a significant depth of categories it is useful to have the ability to limit the depth.

The first image on the right has no limit and is showing all levels but the second image has the limit set to 2 levels.
Tree08DTree08C

Include Option


One of the most useful abilities is to only include specific branches of the tree.
 
Basically you need to list out the individual category branches you wish to 'include'.

The image opposite is taken from the regular Categories view so that the following examples are more readily understood.

The examples use the 'LoggedOnDownloads' top level category. It has five sub-category levels


Note that for include the path must be specified in full, and must start at a top level category.
V4 include category list



This is done from the Pull Down List starting with a top level category. 

Once selected that Category is no longer visible in the pulldow, as shown in the first picture opposite, so it is easy to see where you are in the chain.

The second image shows the required 'chain' of categories
tree20V4 include02



After completing the 'include' path then the view shown is like the one opposite.

Note that the option 'Select Number of Levels' had to be increased.  Also the 'Overview' is not shown.

The 'Include' does not override any View Access Levels. 

For example if all the Categories in the selected Branches have Registered as the Access Level then a user who is not logged in will not see any part of the Tree module. 
tree08B

Exclude

With the Exclude filter option the listed categories and all their subsequent sub categories are excluded from the view. 

The excluded categories may be anywhere in the tree.  That is unlike the Include filter they do not have to start at a top level category.


In this example the sub categories 'Noddle2A' and '7th Group' were excluded.
Tree07tree19


Colin Mercer, November 2019, updated September 2020, June 2023

Print Email

We use cookies

We use cookies on our website. Some of them are essential for the operation of the site, while others help us to improve this site and the user experience (tracking cookies). You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.