Menu Item Properties

Written by khawaib

Topics: Joomla! 1.5

Gives current menu:

$currentMenuName = JSite::getMenu()->getActive()->name ;

Current Menu ID:

$currentMenuId = JSite::getMenu()->getActive()->id ;

Gives menu status, published (1) and unpublished (0)

$currentMenuStatus = JSite::getMenu()->getActive()->published ;

Non SEO URL of current menu:

$currentMenuLink = JSite::getMenu()->getActive()->link ;

Current menus parent ID:

$currentMenuParent = JSite::getMenu()->getActive()->parent ;

Current Menu’s Access Level Value.(Public = 0, Registered = 1, Special= 2)

$currentMenuAccess = JSite::getMenu()->getActive()->access ;

Leave a Comment Here's Your Chance to Be Heard!

You must be logged in to post a comment.