SiMan CMS
Home
Download
Install
Upgrade
News
CMF Demo
Code Generator
Donate
EN
UA
Home
Demos
UI Navigation - Menus and Navigations
UI Navigation - Menus and Navigations
Item 1 - View demos
Item 2 - Home page
Item 3 - Current URL (relative, autodetect active)
Item 4 - Current URL (absolute)
Item 5 - Custom active URL
Item 6 - Custom named item
Item 7 - Custom named item, active by name
Item 8 - Another one item, in new window/tab, with FontAwesome
Code Example
sm_on_action('navigation', function () { sm_title('UI Navigation - Menus and Navigations'); add_path_home(); add_path('Demos', 'index.php?m=demo'); add_path_current(); $ui = new UI(); $nav = new Navigation(); $nav->AddItem('Item 1 - View demos', 'index.php?m=demo&d=regular'); $nav->AddItem('Item 2 - Home page', sm_homepage()); $nav->AddItem('Item 3 - Current URL (relative, autodetect active)', 'index.php?m=demo&d=navigation'); $nav->AddItem('Item 4 - Current URL (absolute)', sm_this_url()); $nav->AddItem('Item 5 - Custom active URL', 'index.php?m=demo&d=regular') ->SetActive(); $nav->AddItem('Item 6 - Custom named item', 'index.php?m=demo&d=regular', 'name1'); $nav->AddItem('Item 7 - Custom named item, active by name', 'index.php?m=demo&d=regular', 'name2'); $nav->AddItem('Item 8 - Another one item, in new window/tab, with FontAwesome', 'index.php?m=demo&d=regular') ->OpenInNewWindow() ->SetFA('external-link'); $nav->AutoDetectActive(); $nav->SetActive('name2'); $ui->Add($nav); $ui->Output(true); });
News
Announcements
Releases
Updates
Other News
Ads