Joomla SEF to work properly it is based on Joomla menus. In your own components for SEF to work and menus to appear your need to pass the Itemid to links. To do this you need to get the Itemid based on on the URL link. Here is how you get the Itemid by link.
This code gets the Itemid of a menu link when you know the component and the view
- $url = 'index.php?option=[[option]]&view=[[view]]';
- $menu = &JSite::getMenu();
- $menuItem = $menu->getItems( 'link', $url, true );
- $Itemid = $menuItem->id;
You need to login to post a comment.