Difference between revisions of "Creating Required Joomla Menu Items"

From JReviews Documentation
Jump to: navigation, search
Line 1: Line 1:
 
__TOC__
 
__TOC__
  
All listings and articles in Joomla should have a parent menu item, otherwise their URLs will have ugly "/component/content/article/" segment and it won't be possible to assign them modules.
+
All listings and articles in Joomla should have a parent menu item, otherwise their URLs have ugly "/component/content/article/" segment and it is not possible to assign modules to those pages.
  
JReviews uses Joomla's content system for listings and because of this each listing must have a Joomla Category menu item as parent, so if you already created JReviews Category List menu items, Joomla will not use them as parent menu items for listings.
+
Without a parent menu item, the listing URL will look similar to this:
 +
*<span style="color: blue">example.com/component/content/article/49-category-name/subcategory-name/305-listing-title</span>
  
Without a parent menu item, the listing url will look similar to this:
 
*http://www.example.com/component/content/article/49-category-name/subcategory-name/305-listing-title
 
  
 +
JReviews uses Joomla's content system for listings and because of this the parent menu item of listings must be a Joomla Category menu item. After  you create those menu items, the "/component/content/article/" segment in URLs will be replaced with the titles of category menu items.
  
When you create a parent menu item, the "/component/content/article/" part will be replaced with the title alias of that menu item (i.e. /hotels/) and the listing detail page will show all modules that you assign to this parent menu item.
+
Starting with JReviews 2.4.10 version, those Joomla Category menu items can be used as the main navigation of your site if you enable the [[Using  JReviews SEF Plugin|JReviews SEF Plugin]]. In this case, create Joomla Category menu items in the main menu of your site.
  
Since these Joomla Category menu items are required only for nicer listing SEF URLs and for module assignments, the menu items don't need to be visible on the site, that is why we create them inside a "Hidden Menu".
+
If you don't enable the [[Using JReviews SEF Plugin|JReviews SEF Plugin]], you will need to create required Joomla category menu items in a "hidden" menu that isn't shown on your site and for the main menu of the site create separate JReviews Category List menu items.
  
  
== Creating Category menu items in Joomla 2.5 ==
+
== Creating required category menu items in Joomla 2.5 ==
  
 
=== How to choose the best category menu item structure ===
 
=== How to choose the best category menu item structure ===
  
Choosing a good menu item structure is important because the title aliases of those menu items will be used in urls of listings.
+
Choosing a good menu item structure is important because the title aliases of those menu items will be used in URLs of listings. You have a choice:
It is possible that you have many categories, but you don't need to create menu items for all of them. A good approach is to create menu items only for all top level categories, or only for last level categories which contain actual listings.
+
* create menu items only for top level categories
 +
* create menu items only for last level categories
 +
* create menu items for all categories
  
=== Steps for creating the menu items ===
 
  
*In the Joomla administration click on Menus => Menu Manager and to create a new menu click on '''New'''.
+
The third option is recommended because then none of the category URLs will have ID numbers and urls will include the full category structure.
*In the next screen enter the '''Title''' and '''Menu Type''':
+
  
[[File:NewHiddenMenu17.png]]
+
Read [[Using JReviews SEF Plugin]] for more info.
  
*Next, start creating menu items in the '''Hidden Menu'''
+
 
*After you click on '''New''' and click on '''Select''' Menu Item Type, you will get this popup with the list of available menu item types, choose Category Blog or Category List:  
+
=== Steps for creating the menu items when JReviews SEF plugin is used ===
 +
 
 +
*In Joomla administration go to the main menu of your site where you want to display the Categories and click the '''New''' button in the toolbar.
 +
*Next click on '''Select''' button and you will get this popup with the list of available menu item types, choose Category Blog or Category List (it is not important which one):  
  
 
[[File:NewJoomlaMenuItems17.png]]
 
[[File:NewJoomlaMenuItems17.png]]
  
 
*After you click on the menu type, you will need to choose a category from the dropdown.  
 
*After you click on the menu type, you will need to choose a category from the dropdown.  
*After you created all menu items, go to JReviews administration and click on the "Clear Cache" link in the left menu. This is necessary because JReviews stores a cached version of the menu system to improve performance.
+
*After you created menu items for all categories, go to JReviews administration and click on the "Clear Cache" link in the left menu. This is necessary because JReviews stores a cached version of the menu system to improve performance.
  
=== Video Tutorial ===
 
*[[City Guide Part 10 - Setting up SEF URLs and Creating Required Joomla  Menu Items|City Guide video tutorial Part 10 - Setting up SEF URLs and Creating Required Joomla  Menu Items]]
 
  
 +
With this setup, you will have a "perfect" url structure, for example:
 +
*<span style="color: blue">example.com/category-name</span>
 +
*<span style="color: blue">example.com/category-name/subcategory-name</span>
 +
*<span style="color: blue">example.com/category-name/subcategory-name/listing-title</span>
  
== Creating Section/Category menu items in Joomla 1.5 ==
 
  
=== How to choose the best section/category menu item structure ===
+
=== Steps for creating the menu items when JReviews SEF plugin isn't used ===
  
Choosing a good menu item structure is important because the title aliases of those menu items will be used in urls of listings.
+
*In the Joomla administration click on Menus => Menu Manager and to create a new menu click on '''New'''.
 +
*In the next screen enter the '''Title''' and '''Menu Type''':
  
If you create Joomla Section menu items, the URLs will look like this:
+
[[File:NewHiddenMenu17.png]]
*<span style="color: blue">http://example.com/section-menu-alias/id-category-alias/id-article-titlealias</span>
+
  
If you create Joomla Category menu items, the URLs will look like this:
+
*After the '''Hidden Menu''' is created, click '''New''' in the toolbar to create the first menu item.
*<span style="color: blue">http://example.com/category-menu-alias/id-article-titlealias</span>
+
*Next  click on '''Select''' button and you will get this popup with the list  of available menu item types, choose Category Blog or Category List (it  is not important which one):
  
If you decide to create both Joomla Section and Category menu items, the URLs will look like this:  
+
[[File:NewJoomlaMenuItems17.png]]
*<span style="color: blue">http://example.com/section-menu-alias/category-menu-alias/id-article-titlealias</span>
+
 
+
=== Steps for creating the section or category menu items ===
+
  
*In the Joomla administration click on Menus => Menu Manager and to create a new menu click on '''New'''.
+
*After you click on the menu type, you will need to choose a category from the dropdown.  
*In the next screen enter the '''Name''' and '''Title''' of the menu, but  leave the Module Title empty, so that the module won't be created:
+
*After you created menu items for all categories, go to JReviews administration and click on the "Clear Cache" link in the left menu. This is necessary because JReviews stores a cached version of the menu system to improve performance.
 
+
[[File:NewHiddenMenu.png]]
+
  
*Next, start creating menu items in the '''Hidden Menu'''
 
  
[[File:NewJoomlaMenuItems.png]]
+
With this setup, the listing URLs will include the category names that you created in this Hidden Menu, for example:
 +
*<span style="color: blue">example.com/category-name/ID-listing-title</span>
  
*Make sure you enter unique Title/Alias for each menu item, because duplicates will cause SEF issues
 
*After  you created all menu items, go to JReviews administration and click on  the "Clear Cache" link in the left menu. This is necessary because  JReviews stores a cached version of the menu system to improve  performance.
 
  
 +
But the categories will have a separate URL structure based on how you create JReviews Category List menu items in the main menu of your site.
  
  

Revision as of 21:43, 17 September 2013

All listings and articles in Joomla should have a parent menu item, otherwise their URLs have ugly "/component/content/article/" segment and it is not possible to assign modules to those pages.

Without a parent menu item, the listing URL will look similar to this:

  • example.com/component/content/article/49-category-name/subcategory-name/305-listing-title


JReviews uses Joomla's content system for listings and because of this the parent menu item of listings must be a Joomla Category menu item. After you create those menu items, the "/component/content/article/" segment in URLs will be replaced with the titles of category menu items.

Starting with JReviews 2.4.10 version, those Joomla Category menu items can be used as the main navigation of your site if you enable the JReviews SEF Plugin. In this case, create Joomla Category menu items in the main menu of your site.

If you don't enable the JReviews SEF Plugin, you will need to create required Joomla category menu items in a "hidden" menu that isn't shown on your site and for the main menu of the site create separate JReviews Category List menu items.


Creating required category menu items in Joomla 2.5

How to choose the best category menu item structure

Choosing a good menu item structure is important because the title aliases of those menu items will be used in URLs of listings. You have a choice:

  • create menu items only for top level categories
  • create menu items only for last level categories
  • create menu items for all categories


The third option is recommended because then none of the category URLs will have ID numbers and urls will include the full category structure.

Read Using JReviews SEF Plugin for more info.


Steps for creating the menu items when JReviews SEF plugin is used

  • In Joomla administration go to the main menu of your site where you want to display the Categories and click the New button in the toolbar.
  • Next click on Select button and you will get this popup with the list of available menu item types, choose Category Blog or Category List (it is not important which one):

NewJoomlaMenuItems17.png

  • After you click on the menu type, you will need to choose a category from the dropdown.
  • After you created menu items for all categories, go to JReviews administration and click on the "Clear Cache" link in the left menu. This is necessary because JReviews stores a cached version of the menu system to improve performance.


With this setup, you will have a "perfect" url structure, for example:

  • example.com/category-name
  • example.com/category-name/subcategory-name
  • example.com/category-name/subcategory-name/listing-title


Steps for creating the menu items when JReviews SEF plugin isn't used

  • In the Joomla administration click on Menus => Menu Manager and to create a new menu click on New.
  • In the next screen enter the Title and Menu Type:

NewHiddenMenu17.png

  • After the Hidden Menu is created, click New in the toolbar to create the first menu item.
  • Next click on Select button and you will get this popup with the list of available menu item types, choose Category Blog or Category List (it is not important which one):

NewJoomlaMenuItems17.png

  • After you click on the menu type, you will need to choose a category from the dropdown.
  • After you created menu items for all categories, go to JReviews administration and click on the "Clear Cache" link in the left menu. This is necessary because JReviews stores a cached version of the menu system to improve performance.


With this setup, the listing URLs will include the category names that you created in this Hidden Menu, for example:

  • example.com/category-name/ID-listing-title


But the categories will have a separate URL structure based on how you create JReviews Category List menu items in the main menu of your site.