Welcome Guest, Not a member yet? Register   Sign In
How to set tree view in dynamic menu in codeigniter
#4

You can try this, I created it a while back so hope it still works. No time to test right now.

PHP Code:
/**
 * active_link ()
 * ------------------------------------------------------------------------
 *
 * Sets the active links
 *
 * Usage HTML Code:
 *
 *  You need to tell it the page name.
 *
 * <li <?php echo active_link('Welcome');?>>
 *
 * @access    public
 * @param    string
 * @return    string
 */
if ( ! function_exists('active_link'))
{
    function 
active_link($controller)
    {
        
$_ci =& get_instance();

        
$class $_ci->router->fetch_class();

        return (
$class == $controller) ? ' class="active"' '';
    }


Hope it helps.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply


Messages In This Thread
RE: How to set tree view in dynamic menu in codeigniter - by InsiteFX - 08-11-2018, 05:30 AM



Theme © iAndrew 2016 - Forum software by © MyBB