Tree Module

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 'Link Type' tab and find the setting 'Display in Menu' and set to No, then Save & Close.

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

tree22tree24

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 Overview Link then that indicates that no 'exclude' or 'include' 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.

.
Tree02
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.

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.

Note the use of ( ) to denote number of sub categories and [ ] to denote the number of Downloads in the current and subsequent subcategories. This assists recognition when only one type is shown.

Tree03

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

Active Links

A feature of the Tree module, in common with other modules, is that the links are active. 

Dependant on the setting of parameter "Linked to download-detail page?" the link is either to the Download Detail page or to the specified Category.  So clicking a link will show one of these views in the main content area.

The only category that is not linked is of course the one that is currently being shown in the main content area.  With the default css the active links are shown in blue text and the current link is in black text.
Tree04
Also the Tree module will 'track' which ever Category is being shown in the main view.

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 4 levels  but the second image has the limit set to 2 levels.
Tree08DTree08C

Include

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'.
Note that for include the path must be specified in full, and must start at a top level category.

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

Once selected that Category is 'greyed out', as shown in the first picture opposite, so it is easy to see where you are in the chain.
tree20tree21
The Categories Noddle Website and then Noddle Downloads were added as in the picture on the far right above.

After completing the 'include' path such as shown on the far right above, then the view shown is like the one opposite.

This 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.  Even the module title is not shown!
tree08B

If the view is restricted by the 'exclude' or 'include' filter options then the Overview link is not shown.

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.
Tree07tree19
With the 'exclude' filter set as illustrated then the resultant view stops at Noodle2A, that is compared to the earlier picture sub-category Noddle Downloads and its sub categories no longer appear.


Colin Mercer, November 2019, updated September 2020

Tags: index

Print Email