Difference between revisions of "Using Joomla Core SEF"

From JReviews Documentation
Jump to: navigation, search
(Created page with '== Default Joomla URLs == Examples of default non-SEF URLs: '''Content Article:''' *http://example.com/index.php?option=com_content&view=article&catid=8:smartphones&id=8:nokia-…')
 
Line 63: Line 63:
  
 
*After the menu is created, click on its name and create the menu items:
 
*After the menu is created, click on its name and create the menu items:
If you create "Section Blog Layout" menu items for all your sections, your article URLs will look like this:
+
**If you create "Section Blog Layout" menu items for all your sections, your article URLs will look like this:
*http://example.com/section-name/id-category-name/id-article-title
+
***http://example.com/section-name/id-category-name/id-article-title
If you create "Category Blog/List Layout" menu items for all your categories, your article URLs will look like this:
+
**If you create "Category Blog/List Layout" menu items for all your categories, your article URLs will look like this:
*http://example.com/category-name/id-article-title
+
***http://example.com/category-name/id-article-title
 
You probably have a lot more categories than sections, so creating Section menu items will be faster.
 
You probably have a lot more categories than sections, so creating Section menu items will be faster.
  

Revision as of 19:08, 9 November 2009

Default Joomla URLs

Examples of default non-SEF URLs:

Content Article:


JReviews menu item:


Jreviews click2search pages (tags):


Enabling Joomla Core SEF URLs

To make the URLs look nicer, you can enable Joomla core SEF:

  • Go to Joomla Global Configuration, and on first tab set Search Engine Friendly URLs and Use Apache mod_rewrite to Yes. 'Add suffix to URLs' is optional.

JoomlaCoreSEF.png

  • Next go to the root folder of your site and rename htaccess.txt file to .htaccess


After you refresh your site, URLs will be something like this:

Content Article:


JReviews menu item:


Jreviews click2search pages (tags):


URLs are nicer, but the Content Article URL is still too long. We should get rid of /component/content part.

So, instead of:

you can have:

or:


To have those type of URLs, it is required to create Joomla Article Section/Category menu items.


Creating Joomla Article Section/Category Menu Items

Besides for nicer URLs when SEF is enabled, Article Section/Category menu items are required if you want your articles (listings) to inherit the modules from the Section/Category list pages. Without those menu items, modules will be lost when you click on article detail page.

You can create those menu items in a hidden menu so they will not be displayed on your site, because it is better to have JReviews Section/Category menu items for your navigation.


  • Go to Joomla Menu Manager and create a new Menu: enter the Unique Name and Title (for example "SectionMenus" or "HiddenMenus", ...), but leave the Module Title empty, so that the module for this menu will not be created. Or you can create the module, but make it unpublished.

You probably have a lot more categories than sections, so creating Section menu items will be faster.

  • After you created all your menu items, go to JReviews component page and click on "Clear Cache" link in the left menu.


Now your URLs will be much nicer and modules assigned to Section/Category list pages will not be lost when you view article (listing) detail pages.


With Joomla Core SEF it is not possible to remove ID numbers from URLs. For that, you need to use one of Joomla SEF extensions like sh404SEF or SEF Advance (only those two are supported by JReviews).

But it is recommended to use Joomla Core SEF, using other SEF components can affect on your site's performance.