Al2ash
January 2nd, 2018, 23:42
دوستان عزیز سلام
من با یک سری اطلاعاتی که از سایت whmcs گرفتم ، از طریق هوک یه منوی جدید با زیر منو ساختم ، همه چیز اوکی هست ، فقط یه مشکلی که دارم اینه که نمیدونم دستور active رو چجوری بهش بدم که هر کدوم از زیر منوها رو که انتخاب میکنم اکتیو بمونه استایلش مثل منوهای قالب خودم بشه ؟
ممنون میشم اگر کسی میتونه راهنماییم کنه
اینم کد هوک :
<?php
use WHMCS\View\Menu\Item as MenuItem;
// Add term of services links to the end of all primary navbar.
add_hook('ClientAreaPrimaryNavbar', 8, function (MenuItem $primaryNavbar)
{
// Add a Menu to the end of the Primary navbar for Term Of Services links.
// Declare it with the name "term-of-services" so we can easily retrieve it
// later.
$primaryNavbar->addChild('term-of-services', array(
'label' => 'قوانین ارائه سرویس',
'order' => '1',
'uri' => '#',
));
// Retrieve the panel we just created.
$temOfservicesPanel = $primaryNavbar->getChild('term-of-services');
// Move the panel to the end of the sorting order so it's always displayed
// as the last panel in the sidebar.
$temOfservicesPanel->moveToBack();
// Add a Submenu1 link to the panel.
$temOfservicesPanel->addChild('submenu-1', array(
'uri' => 'tos.php',
'label' => 'قوانین و شرایط کلی',
'order' => 1,
));
// Add a Submenu2 link to the panel after the submenu1 link.
$temOfservicesPanel->addChild('submenu-2', array(
'uri' => 'servertos.php',
'label' => 'قوانین خدمات میزبانی',
'order' => 2,
));
// Add a Submenu3 link to the panel after the submenu2 link.
$temOfservicesPanel->addChild('submenu-3', array(
'uri' => 'domaintos.php',
'label' => 'قوانین خدمات دامنه',
'order' => 3,
));
});
من با یک سری اطلاعاتی که از سایت whmcs گرفتم ، از طریق هوک یه منوی جدید با زیر منو ساختم ، همه چیز اوکی هست ، فقط یه مشکلی که دارم اینه که نمیدونم دستور active رو چجوری بهش بدم که هر کدوم از زیر منوها رو که انتخاب میکنم اکتیو بمونه استایلش مثل منوهای قالب خودم بشه ؟
ممنون میشم اگر کسی میتونه راهنماییم کنه
اینم کد هوک :
<?php
use WHMCS\View\Menu\Item as MenuItem;
// Add term of services links to the end of all primary navbar.
add_hook('ClientAreaPrimaryNavbar', 8, function (MenuItem $primaryNavbar)
{
// Add a Menu to the end of the Primary navbar for Term Of Services links.
// Declare it with the name "term-of-services" so we can easily retrieve it
// later.
$primaryNavbar->addChild('term-of-services', array(
'label' => 'قوانین ارائه سرویس',
'order' => '1',
'uri' => '#',
));
// Retrieve the panel we just created.
$temOfservicesPanel = $primaryNavbar->getChild('term-of-services');
// Move the panel to the end of the sorting order so it's always displayed
// as the last panel in the sidebar.
$temOfservicesPanel->moveToBack();
// Add a Submenu1 link to the panel.
$temOfservicesPanel->addChild('submenu-1', array(
'uri' => 'tos.php',
'label' => 'قوانین و شرایط کلی',
'order' => 1,
));
// Add a Submenu2 link to the panel after the submenu1 link.
$temOfservicesPanel->addChild('submenu-2', array(
'uri' => 'servertos.php',
'label' => 'قوانین خدمات میزبانی',
'order' => 2,
));
// Add a Submenu3 link to the panel after the submenu2 link.
$temOfservicesPanel->addChild('submenu-3', array(
'uri' => 'domaintos.php',
'label' => 'قوانین خدمات دامنه',
'order' => 3,
));
});