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

Joomla submenus for categories make URL too long. How to shorten?

Started by webenhanced, 27.05.2025 01:53:07

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

webenhanced

I have 8 categories and some of them are for public viewing and some are for registered only. So I created a main menu item ("Publications") with an J! article that describes what is inside.

The first submenu is the "list-all" entry and it is hidden.

I then created a submenu (of Publications) item for each category and used the Joomla system to restrict access. The submenu name is the same as the category name (and I think their alias is the same too.

Publications
- List all Categories
- Category 1
- Category 2
etc

So the URLs are now in the form of:-
/publications/submenuAlias/category/9-categoryAlias

But if I go to /publications/categoryAlias the correct page is displayed. When I click on a download file link in the list, the URL goes to /publications/submenuAlias/download/9-categoryAlias/99-downloadAlias.

Is there a way to keep a shorter URL?

Have I made a mistake by NOT having the "list-all" menu entry as the parent for the submenus?

Any feedback gratefully received.
  •  

ColinM

Hi
As I understand what you are wanting is to pulish one or more articles that have links to relevant downloads/categories.  Asuming I have understood correcly then I would sugest you use the jD 'Content Plugins'  Basically it automatically makes a short reference to catorgries and Downloads by using 'ids'.
See articles: NB Appendix 2 of the second article shows the details

Introduction to jD Content in Articles
https://www.jdownloads.net/documentation?view=article&id=269&catid=30

Additional Aspects of Using the Content Plugin
https://www.jdownloads.net/documentation?view=article&id=119&catid=30

Using the Content Plugin is what I call a "bicycle" problem - clearly impossible when you start but easy in reality

Colin
Colin M
  •  

webenhanced

I was not clear enough in my initial post.
"jDownloads Version 4.0.47 Stable" by the way, on a Joomla 5.3.1.

The issue I want to solve is the length of the URL to a particular category or individual download when using the jDownloads 'single category' item type for an entry in the main Joomla menu.

What do I mean by this? Suppose I have a root menu item called "List all categories" using the jDownloads type as required in the install documents. The menu item has an alias of "list-all-categories".

Under that, in the Joomla menu system, I have a sub menu item that uses the jDownloads "single category" item type. It is called (say) "Council Meeting Reports" with a Joomla menu system alias of "council-meeting-reports" and the category, called "Council Watch" has an alias of "council-watch".

There is another jDownloads category that does NOT have a Joomla menu entry. It is called "Newsletter" with an alias of "newsletter".

The URLs produced in links from the listings on the "List all categories" page itself, are made up as follows:-
/list-all-categories/council-meeting-reports/category/5-council-watch
/list-all-categories/category/7-newsletter

Notice the newsletter category with no Joomla menu entry does not have the extra alias in the URL. This is as expected as there is no alias to find.

If I manually remove the menu item alias and paste it into the address bar of the browser like so:-
/list-all-categories/category/5-council-watch
then links on the category listing page are relative to the URL and therefore ignore the menu item alias. And if I stay inside that one category, the menu item alias does not come back into the URL unless I choose the Up button to get from download page to category listing page. If I use the Joomla breadcrumbs module the menu item alias does not come back into the URL link.

Note that the Joomla menu entry alias can also be used by itself like so:-
/list-all-categories/council-meeting-reports
and this also produces the category listing.

However, in the above URL, links to individual downloads keep the menu entry alias plus the jDownloads category alias and the links get quite long again.

Here's the thing...
For the newsletter category, which has no menu item, the links to category and individual downloads are good.

And I really only want the Joomla menu items there to help our users get to their favourite category quickly.

So is there a setting (that I've missed) or a way to have the links produced on the jDownloads listing pages ignore the Joomla submenu item aliases? It would be great if we could turn this behaviour on and off.
  •  

ColinM

Hi
The scheme you have is not feasible without significant changes to jDownloads - but the objective is to get quick access to categories or downloads without going throgh the usual approach when dealing with Councillors and 'lay-people'is a reasonable idea.
There are two solutions. One is to use Tags and the other is to use the jD Content Plugin

I can help you with both of these.
Best wishes
Colin
Colin M
  •  

webenhanced

Thanks for the info Colin,

The Tags approach looks interesting. Are you talking about Joomla Tags which can then have a menu item that is NOT a jDownloads type. And then choose a jDownloads content type to display a list of jDownloads in a category as long as each download has the tag as well as the category.

I also like the idea of using the content plugin where articles can contain links to a particular download. This would be like making the download a "featured" download.

Is this what you are suggesting? Would love to hear your advice.
  •  

ColinM

Hi
Think the best way is using the 'Content Plug in' approach
Please look at article
https://www.jdownloads.net/documentation?view=article&id=119&catid=30
Particularly Appendix 2

I will send you a Private Message (PM) later today - they are secure
Colin
Colin M
  •