Difference between revisions of "Creating Required Joomla Menu Items"

From JReviews Documentation
Jump to: navigation, search
m
 
(15 intermediate revisions by 2 users not shown)
Line 1: Line 1:
JReviews uses Joomla's content system for Listings, so the Listing pages in JReviews have the exact same url as Joomla Article pages. Because of this, it is necessary to create several core Joomla Menu items to ensure that the Listing (Article) URLs will have the correct Itemid parameter (&Itemid=) that Joomla can use for proper module assignments and better SEF URLs .
+
__TOC__
  
You need to create Joomla '''Section Blog/List Layout''' or '''Category Blog/List Layout''' menu items for all Joomla Sections or Categories used with JReviews. Your choice will affect the way listings' SEF URLs will look if you use [[Using Joomla Core SEF|Joomla Core SEF]]<br />
+
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.
  
If you create Joomla Section menu items, the URLs will look like this:
+
Without a parent menu item, the listing URL will look similar to this:
*<span style="color: blue">http://example.com/section-menu-alias/id-category-alias/id-article-titlealias</span>
+
*<span style="color: blue">example.com/component/content/article/49-category-name/subcategory-name/305-listing-title</span>
  
If you create Joomla Category menu items, the URLs will look like this:
+
JReviews uses Joomla's content system for listings and because of this the parent menu item of listings must be a '''Joomla Category Blog/List 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.
*<span style="color: blue">http://example.com/category-menu-alias/id-article-titlealias</span>
+
  
If you decide to create both Joomla Section and Category menu items, the URLs will look like this:
+
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.
*<span style="color: blue">http://example.com/section-menu-alias/category-menu-alias/id-article-titlealias</span>
+
  
 +
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.
  
Because JReviews also has it's own menus for sections and categories, the above Joomla menus are considered duplicates and don't need to be displayed on your site. They need to be created only to ensure proper module assignments and nicer SEF URLs for listing pages. We recommend creating a new "Hidden Menu" without a module. If you want to display Section and Category menu items on your site create [[Creating JReviews Menu Items|JReviews Section/Category List menu items]].
+
== Creating required category menu items ==
  
 +
=== How to choose the best category menu item structure ===
  
== Steps for creating Joomla Section or Category menu items ==
+
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
  
*in the Joomla administration click on Menus => Menu Manager and to create a new menu click on the '''New''' button
+
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 '''Name''' and '''Title''' of the menu, but leave the Module Title empty, so that the module won't be created:
+
[[File:NewHiddenMenu.png]]
+
*next, start creating menu items in the '''Hidden Menu'''
+
[[File:NewJoomlaMenuItems.png]]
+
*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 "Clear Cache" link in the left menu. This is necessary because JReviews stores a cached version of the menu system to improve performance.
+
  
 +
Read [[Using JReviews SEF Plugin]] for more info.
  
== Relation between Modules and the core Joomla Section/Category menu items ==
+
=== Steps for creating the menu items when JReviews SEF plugin is used ===
*Joomla core Section/Category menu items are important because URLs of listing pages will have their ItemIDs
+
*That means that if you want to display certain modules in listing detail pages (Joomla article pages), you must assign modules to those Joomla menu items
+
*Creating the JReviews Section/Category menu items is not enough because the Joomla article system doesn't look for JReviews menus when trying to figure out the ItemIDs of the articles, it only looks for core Joomla menus.
+
  
 +
*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 the '''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]]
 +
 +
*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 & File Registry" 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:
 +
*<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>
 +
 +
=== 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''':
 +
 +
[[File:NewHiddenMenu17.png]]
 +
 +
*after the '''Hidden Menu''' is created, click '''New''' in the toolbar to create the first menu item.
 +
*next  click the '''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]]
 +
 +
*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 & File Registry" 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:
 +
*<span style="color: blue">example.com/category-name/ID-listing-title</span>
 +
 +
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.
  
  

Latest revision as of 10:52, 7 January 2014

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 Blog/List 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

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 the 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 & File Registry" 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 the 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 & File Registry" 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

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.