Toolbar Explained

Revision as of 18:58, 27 June 2013 by Sinisakrisan (Talk | contribs)

Overview

It seems that there is a lot of confusion about what JomSocial Toolbar is and how does it work.
This article will explain what actually toolbar is and what can you expect from it.

History

To better understand the JomSocial Toolbar we need to go back in time and see how it evolved

JomSocial 1

Toolbar1.0.png

At the early stage, JomSocial had pretty much basic toolbar which was used as internal navigation system
This toolbar was very hard to manage. Including additional items to it was a nightmare for most users because it was only possible by creating plugin which will add the new set of menus, or, by hacking the core files which never was a good practice.
Toolbar with more or less this design lingered till JomSocial 1.8
JomSocial 2 brought up some massive redesign in design and functionality

JomSocial 2

Toolbar2.8.png

Series 2 of JomSocial introduced redesigned toolbar, adding icons to the mix with tabs, notification system as well as few hard options such are returning back to "home" and "logout" but most noticeable improvement was possibility to add new menu items through Joomla Menu Manager.
This possibility however brought up new confusion which will be explained later through this article.

JomSocial 3

Toolbar3.0.png

Except redesign to fit into new JomSocial layout, Toolbar in series 3 didn't suffered any changes in functionality. It is the same old toolbar JomSocial 2 users used to, but wrapped into different style powered by Twitter Bootstrap
Because it is built with bootstrap, JomSocial toolbar is also responsive

Toolbar3.0responsive.png

What toolbar is used for?

The main purpose of JomSocial Toolbar is to provide internal navigation within component
As said in History section of this article, earlier version of JomSocial had toolbar integrated into core code and it was really hard to add new items to it. Modern toolbar allows site admin to do that easily through Joomla menu manager but, due to this fact, it often creates the illusion that toolbar can be used as any other standard Joomla menu.

Working Principle

To fully understand how JomSocial toolbar works, you will first need to disable SEF on your site. On Joomla 2.5 and above, SEF links are enabled by default, so you will have to navigate to the site backend and from dropdown menu select

  • Site -> Global Configuration on Joomla 2.5
  • System -> Global configuration on Joomla 3.x

Option Search Engine Friendly URLs must be set to No

Seo.png

Then proceed with JomSocial installation

Note on disabling SEF - it is very common practice to disable sef when you debug the navigation problems. It should be first thing to do when there is some navigation or module assignment problem on your site

After JomSocial is installed you will notice two very important things
1. JomSocial Toolbar menu is created with entire internal navigation for JomSocial

Jstoolbarmenu.png

2. Component Entry Page is created in main menu

Entrypage.png

{{alert|Entry page is usually created in Main Menu. If you dont have this menu, JomSocial entry page will be created in the menu where your home page is.

We will also need to know what is the Entry page item ID
To see this, open the JomSocial link that was automaticaly created during installation and edit it

Entrypageid.png

As you can see on the image above, this menu item ID which will serve as entry page have id of 491
If we now go to any page in JomSocial component, we will notice that no matter what item in toolbar we click, this itemid will always be taken

491.png
Important - The picture above shows group page opened. It is however just for showing. ALL items in toolbar will always take the ID of Entry Page

Things to Know

  • You can have multiple entry pages If you set the menu item outside JomSocial Toolbar which will link to say.... photos page, whenever you visit photos page by using the toolbar navigation, the respective id from that menu will be taken. Again, this is why is so important to know how to properly use non-saf links when it comes to debugging. Feel free to try it
  • Toolbar items DO NOT follow Joomla ACL - Because JomSocial will always use the entry page which is available for current page, Joomla ACL does not makes sense. You will need to set the ACL on entry page level
  • Modules can NOT be assigned to toolbar items - Same as with ACL. You can't assign modules to items in JomSocial Toolbar, but you can assign them to the entry page
  • Only one level of dropdowns are allowed in toolbar - Toolbar is displayed through JomSocial template file. It is not a standard Joomla menu and it is not designed to support more then 1 level dropdown menu.

Common Mistakes

  • Setting the toolbar item as home page
  • Trying to assign modules to toolbar items
  • Trying to restrict items with Joomla ACL
  • Trying to use JomSocial Toolbar as main site navigation
  • Creating duplicate entry pages all over the site navigation