News:

Support for jDownloads 3 has been ended
Since 17 August 2023 Joomla.org has discontinued support for Joomla 3.x. Therefore, we will no longer offer official support for our Joomla 3 jDownloads version 3.9.x from January 2024.
Please update your website to the latest Joomla version (Joomla 4 or Joomla 5) as soon as possible. Afterwards, please update jDownloads to the latest published version. The longer you delay, the more difficult the upgrade process for your website is likely to be.

Main Menu
Support-Forum

JDownloads Tree and the 'Overview' top level.

Started by kbranden, 08.06.2016 15:17:53

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

kbranden

Hello, I have been looking and can't seem to find it, so hopefully someone can point me in the right direction.  How can I rename the 'Overview' label in the Tree and remove its link ability?  Thanks.
  •  

ColinM

Hi
There is no parameter which will remove the 'Overview' and its link ability.  It would require a code change.

The actual line of code is
$home_link = '<a href="'.$home_url.'">'.JText::_('COM_JDOWNLOADS_HOME_LINKTEXT').'</a>';

So the text comes from one of the translation files where COM_JDOWNLOADS_HOME_LINKTEXT is replaced with the relevant translation.

The line of code above is in file mod_jdownloads_tree.php at line 42.  If you insert a line $home_link=''; as line 43 then the word Overview and as a link will disappear but the symbol will remain.

If you do decide to make a code change then be prepared to redo after any upgrade.
But is it really annoying?

Colin
PS if you also want to remove the symbol then instead of above delete the line
        echo '<img height="18" width="18" src="modules/mod_jdownloads_tree/jdtree/images/base.gif" /> '.$home_link;
which is line 307 in file jdownloadstree.php
Colin M
  •  

kbranden

Thanks ColinM

"But is it really annoying?"

The thing is, is that we have several departments and each department has its own 'files section' which they want to present to the viewer. I have noticed that even though you might have 5 categories added to the tree, if you click on 'Overview' it shows ALL the categories you have created instead of just those you have selected to include which in my case would be a mess. My solution was to just to change the Overview word to 'Downloads' and then remove the link itself. That way, the only way to get to the categories is by clicking on the items in the tree.  I have already removed Overview from the file's template.

Thanks for the response though.. I'll see what I can do with that.

Kevin
  •  

ColinM

Hi
Does each user 'belong' to a department? And do they have to login?
If that is the case I think you can solve the problem by using View Access Levels, and Permissions.  Please let me know.
Colin
Colin M
  •  

kbranden

It's a city government website.  All the departments will have their own files section to let the public access (no login).  So, for instance, the city clerk page will have a files section with categories: Media Releases, Historical Records and Ordinances. The finance dept. will have categories such as City Budget, Annual *** Report, etc.  A treeview will be on each deparment page with those particular categories. My problem was if you clicked on Overview, it would show ALL the categories and not just the ones assigned to that particular departmental treeview.  This wouldn't be so bad if you didn't have 30 departments.  Removing the 'Overview' forces the public to click on one of the categories now.  It would be cool if there was an option on the treeview such as' Overview Mode': with the options of selecting 'Assigned Categories' or 'All Categories'. Just a suggestion though.


  •  

ColinM

OK I understand why removing the 'Overview' is important in your context.

So a good solution for you would be to have an option to not show the overview.
I presume you have used the Category Filter Option set to Include  together with the list of relevant categories for each variant of the Tree module.

Colin
PS I will send you a PM with a test version
Colin M
  •  

ColinM

Hi
Have you been able to try the test version I sent?
Arno has agreed we will make that a permanent feature.
Colin
Colin M
  •