SEF URLs and Creating Custom URLs
Now that we know how to turn on SEF URLs, what happens if you want to modify the URL? It is actually easier than you think.
You may have noticed a field called Alias located under the Title field when working with articles or menu items. Typically, you would leave these two fields blank and Joomla would populate them for you based on what you entered for the Title. These fields are used when creating the SEF URLs. By editing the Alias field, you in turn are editing the SEF URLs that are generated.
The type of menu item used directly affects how the URL is built. Typically, this is done by looking at the menu structure leading up to the active menu item. Let’s look at some examples of what SEF URLs are generated in certain situations:
The About Us link located in the top level of a menu:
http://www.joomlapetcenter.com/about-us.html Suppose there was a submenu item under About Us called “Meet the Team”:
http://www.joomlapetcenter.com/about-us/meet-the-team.html Since Category List Layouts show only a list of articles, we would need to click on an article title in order to see its contents. 28 is the article id, which is there to prevent problems just in case you happen to have two articles with the same name:
http://www.joomlapetcenter.com/about-us/news/28-best-in-town.html
We assume you get the general idea. Let’s take a look at how we can change one of these. How about the second one? We’d prefer to have the URL say meet-our-team instead of meet-the-team ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access