Missing menu link type in component

Category: Phoca
 
In some components (Phoca Download, Phoca Documentation) there are missing menu link types to section, category and to file. There is only menu link type to all sections. This is because of possible problem with Itemid and used SEF in Joomla!
 
If you are using SEF in Joomla!, the links are created with help of aliases of menu links. But you can create menu link only to components, not to modules and plugins. This means, that modules and plugins don't have own Itemids and every link created in module or plugin cannot be created as SEF link. So the following hack for such problem is used in Joomla!. Modules and plugins search for component's Itemid. If they find some, they will use it for menu link creating. They can produce correctly created menu links then. But if they should do this, some menu link to component needs to be created. So if you will create a menu link to all sections, then Joomla! will know, that there is an Itemid for the component. This Itemid is stored in system and if SEF is used, the links are created with help of this Itemid (alias is rendered as URL link). Modules and Plugins can get information about this link and can create correct menu links.
 
In case there is no menu link to all sections, there is no Itemid and modules or plugins will create not correct menu links if SEF is enabled. So it can happens that module will create other link to some place as plugin. It is important that there is one Itemid and all extensions (component, module, plugin) will create the same link.
 
FAQ:
1) I am using Phoca Download (Documentation) Component. I don't want to display menu link to all sections. I want to use Phoca Download Menu Module only, which will access all my sections, categories, etc. I am using SEF?
 
As described, module cannot create menu link and menu link is necessary to build correct link. In such case you should go to Menu Manager and you should create new menu group. After you will create menu group, you should create menu link to Phoca Download component under this menu group. Now Joomla! get Itemid for Phoca Download and module will try to find this Itemid and will do correct URL link.
 
If you want to hide menu link to Phoca Download, you will make the menu group, where this menu link appears, unpublished. It means, the menu group will be unpbulished but the menu link to Phoca Download will be published. If it is published, Itemid exists and module can find it. But as menu group is unpublished, no menu link will be displayed in frontend.
 
2) I am using Phoca Download (Documentation) Component. I want to create menu link to section, category or to file. I am using SEF?
 
You should go to Menu Manager and you should create new menu group. After you will create menu group, you should create menu link to Phoca Download component under this menu group. Now Joomla! get Itemid for Phoca Download (menu link to all sections). Go to your frontend and click on menu link to all sections. Navigate to e.g. some category and copy the URL of this link (in URL bar of your browser - URL which links to category). Go to Menu Manger in backend and create menu link in menu group which will be published. The type of menu link will be External link. Add name and alias and paste the copied link to Link field. Save it and then you will have menu link to category in frontend created.
See 1) how to make the link to all sections unpublished.
 

 

Powered by Phoca