// Define menu items $items = array( JHtmlSidebar::addEntry('Home', 'index.php', $option), JHtmlSidebar::addEntry('About', 'index.php?option=com_about', $option), ); // Create the sidebar menu JHtmlSidebar::render($items);
// Define menu items $items = array( JHtmlSidebar::addEntry('Home', 'index.php', $option), JHtmlSidebar::addEntry('About', 'index.php?option=com_about', $option), ); // Add a title and icon to the menu JHtmlSidebar::setTitle('My Sidebar Menu'); JHtmlSidebar::addFilter('icon', 'fa-home', 'Home', true); // Create the sidebar menu with custom options $options = array( 'icon' => 'fa-bars', 'status' => true ); JHtmlSidebar::render($items, $options);This code creates a customized sidebar menu with a title and icon. The `setTitle` function is used to set a custom title for the menu, and `addFilter` is used to add an icon to the Home menu item. Finally, the `render` function is used to create the sidebar menu with custom options. Package Library: Joomla Framework.