0

I'm trying to understand the way Joomla handles URLs.

I've activated what they call "Search Engine Friendly URLs". But it appears that a page (or an "Article" only gets such a URL once I link it from a menu item.

All other menu items are fine, but when I try to insert a new one then the url is change (http://www.grundtvig.as/forside-general/uncategorised/blisterpakning).

I want the above link like this one: http://www.grundtvig.as/blisterpakning.

Thank you

2 Answers 2

1

The quick answer for having a article with a url like this is to link it (as you already said) with a menu item.

Alternatively, if you would want this happening automatically, without menu items, then you need to install a SEF extension like SH404SEF or JoomSEF.

Update after your comment about JoomSEF:

hmm.. ok - I was actually writing a more extended answer to explain basics of how Joomla deals with URLs. But since you have a SEF extension, assuming you have enable it, then it's not Joomla but the component you are using that handles the urls.

So, you need to tweak the settings of JoomSEF and order it to create links directly to the root for uncategorized articles, or articles that do not have a menu item - meaning that you should set it to not include categories in the SEF URLs.

Finally to deal with already created urls, you need to delete them from the JoomSEF URLs list, and have JoomSEF recreate them according to your new configuration, otherwise the old ones will continue to be used.

4
  • Sir i already install JoomSEF
    – Shehryar
    Nov 17, 2015 at 10:24
  • @Shehryar: Answer Updated
    – FFrewin
    Nov 17, 2015 at 10:31
  • Sir i change it in JoomSEF (New SEF Url) but no affects on output ...
    – Shehryar
    Nov 17, 2015 at 10:47
  • I guess this is because there is already a SEF URL created for that article and it's the one that will be used. It won't create a new one. You have to delete all the old urls for that article, in the URLs management page. For further help on how to use the component, you can go through its documentation.
    – FFrewin
    Nov 17, 2015 at 10:54
2

Joomla SEF URLs - the background

I will try to give briefly some background info.

The common way for displaying content/pages in Joomla, is to create it inside Components..

Components provide menu items, so then you can build your navigation system and create links to pages, that will display content from the associative components.

The basic content component in Joomla is the com_content, or commonly called Articles (articles manager since recently).

You create content as articles. Each article must belong to 1 content category (so to keep things organized), and then it has the ability to be shown as the main content of each page.

Now, each Joomla site must have at least 1 menu item - The Default or Home menu item. Upon Joomla installation, this menu item comes by default and used to be a Featured Articles menu item of the com_content component -(haven't noticed if this has changed recently - maybe it is).

So actually now, you could start creating articles, set them as featured and have them displayed from the 1 single menu item of the home page.

However, the dynamic nature of Joomla allows one more way to access content items of components. This is by using url parameters (using non-SEF urls) like so:

index.php?option=com_content&view=article&id=12

Translating this, it means that you can access the article item with id 12, of the com_content component, using the article view.

In the absence of any other menu item that could take precedence over the default menu item (home), Joomla will use the default one.

... to be continued on another day...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.