Create Downloads in a Fixed Category

Introduction

This article shows how to restict creation of a Download in the Front End to a specified Category that the creator/editor cannot change.
This is different from the situation through User Group Settings where the Download 'creator' may select a category but when editing that category cannot be changed.

Most of the work is in Joomla! as noted below.

Create a User Group

The first step is to ceate a Joomla User Group whose members will only be able to create Downloads in a specified Category.

So in the Joomla! backend goto 'Users - User Groups - New and create a new User Group called for example 'FixedCatUG' and set its parent as Registered.. 

Then from the Joomla! backend Users tab add the relevant users to that User Group.
Fixed Category ug20 Fixed Category ug21

Create a View Access Level

Part of the setup is to create a menu item so it is convenient at this stage to also create a specific Joomla! View Access Level so that only the FixedCatUG members will see the menu item.

So in the Joomla! backend go to Users- Access Level - Add New Access Level and then in the access view panel set a name such as FixedCatView an ensure that the FixedCatUG is selected.  It may also be convenient to join the Super User to the view level.
Fixed Category ug24 Fixed Category ug25

Create a jD Category

If it does not exist already then go to the jDownloads backend and create a suitable category, called in this example FixedCat.

Here we create the jD category as a top level category, that is one with no parent Category.  This is the simplest situation as it is straight forward to set up the Joomla! permissions.  There could of course be subcategories and these and their Downloads will inherit the same permissions.

Set Permissions

We need to set Permissions so that the members of the 'FixedCatUG' are able to create and edit.
After selecting 'Allowed' in the relevant permissions box for user group FixedCatUG then Fixed Category greenticktick marks appear.
Fixed Category ug22 Fixed Category ug23
After clicking on Save the green ticks Fixed Category greentick disappear indicating that the permissions have been set and have propagated.

Create a Menu Item

The Next step is to create a menu item of jD Menu Item Type 'Create Download' in an appropriate menu. Give it a suitable title, such as 'Create Download in FixedCat' in this example.
Set the Access level to 'FixedCatView' so  that only members of the 'FixedCatUG' will see the create menu item.  Most importantly in the the Options tab set the Default Category to Yes and from the 'Choose a category' option pull down select the relevant category, such as  'FixedCat' in this example.
Fixed Category menu01 Fixed Category menu03 Fixed Category menu02 Fixed Category menu02

Setup the User Group Settings

The final stage is setting up 'FixedCatUG' in the jD User Groups Settings.  Clicking on 'FixedCatUG' in the User Groups Settings page will show the detailed settings for the user group.

The Ranking is immediately after theGroup Title. Obviously one needs to set the Ranking to a sufficiently high level, say 135.
Fixed Category ug30
The relevant questions are readily 'ticked' in the 'Group Creation/Editing Settings' tab.

The Display Add/Upload icon may be selected as required as it will produce the same result as the menu item when a member of the 'FixedCatUG' is logged in.

The 'May select a different Category' option can be set as either Yes or No as it is overruled by the menu setting. 

But in case the menu option gets 'unpublished' I would suggest you set this option to 'No'.
Fixed Category ug01B


The Create Download menu item, or the Add button, will now show the name of the fixed Category as illustrated below.  The field is not editable so members of the 'FixedCatUG' cannot change it.
Fixed Category ug32

ColinM November 2019

Tags: index

Print