How to get data from php function? I want to call icon with:
<i class="<?php $this->Html->_($value['icon']);?>"></i>
Not work.
If it works would be like this
<i class="fa fa-cloud"></i>
But if call another function like:
<?php $this->Html->_($value['name']); ?>
Work well.
Main php function:
/**
* Retrieves the primary navigation for the client interface
*
* #param string $base_uri The base_uri for the currently logged in user
* #return array An array of main navigation elements in key/value pairs
* where each key is the URI and each value is an array representing that element including:
* - name The name of the link
* - active True if the element is active
* - sub An array of subnav elements (optional) following the same indexes as above
*/
public function getPrimaryClient($base_uri)
{
$nav = [
$base_uri => [
'name' => $this->_('Navigation.getprimaryclient.nav_dashboard'),
'active' => false
],
$base_uri . 'accounts/' => [
'name' => $this->_('Navigation.getprimaryclient.nav_paymentaccounts'),
'active' => false,
'secondary' => [
$base_uri . 'accounts/' => [
'name' => $this->_('Navigation.getprimaryclient.nav_paymentaccounts'),
'active' => false,
'icon' => 'fa fa-list'
],
$base_uri . 'accounts/add/' => [
'name' => $this->_('Navigation.getprimaryclient.nav_paymentaccounts_add'),
'active' => false,
'icon' => 'fa fa-plus-square'
],
$base_uri => [
'name' => $this->_('Navigation.getprimaryclient.nav_return'),
'active' => false,
'icon' => 'fa fa-arrow-left'
]
]
],
$base_uri . 'contacts/' => [
'name' => $this->_('Navigation.getprimaryclient.nav_contacts'),
'active' => false,
'secondary' => [
$base_uri . 'contacts/' => [
'name' => $this->_('Navigation.getprimaryclient.nav_contacts'),
'active' => false,
'icon' => 'fa fa-list'
],
$base_uri . 'contacts/add/' => [
'name' => $this->_('Navigation.getprimaryclient.nav_contacts_add'),
'active' => false,
'icon' => 'fa fa-plus-square'
],
$base_uri => [
'name' => $this->_('Navigation.getprimaryclient.nav_return'),
'active' => false,
'icon' => 'fa fa-arrow-left'
]
]
]
];
// Include the primary client's plugin navigation
return $this->getPluginNavPrimaryClient($nav, $base_uri);
}
I want to call icon here, as I mark // Get Icon
<?php
$active_nav = null;
?>
<ul class="nav navbar-nav">
<?php
foreach ($this->Html->ifSet($nav, array()) as $link => $value) {
$attributes = array();
$link_attributes = array();
$dropdown = !empty($value['sub']);
$active = false;
if ($value['active']) {
$active = true;
$attributes['class'][] = "active";
$active_nav = $value;
}
if ($dropdown) {
$attributes['class'][] = "dropdown";
$link_attributes['class'][] = "dropdown-toggle";
$link_attributes['data-toggle'][] = "dropdown";
// Set parent to active if child is
if (!$active) {
foreach ($this->Html->ifSet($value['sub'], array()) as $sub_link => $sub_value) {
if ($sub_value['active']) {
$attributes['class'][] = "active";
break;
}
}
}
}
?>
<li<?php echo $this->Html->buildAttributes($attributes);?>>
<a href="<?php $this->Html->_($link);?>"<?php echo $this->Html->buildAttributes($link_attributes);?>>
// Get Icon
<i class="<?php $this->Html->_($value['icon']);?>"></i>
// Get Icon
<?php
$this->Html->_($value['name']);
if ($dropdown) {
?>
<b class="caret"></b>
<?php
}
?>
</a>
<?php
if (!empty($value['sub'])) {
?>
<ul class="dropdown-menu">
<?php
foreach ($this->Html->ifSet($value['sub'], array()) as $sub_link => $sub_value) {
?>
<li>
<i class="<?php $this->Html->_($sub_value['icon']);?>"></i> <?php $this->Html->_($sub_value['name']);?>
</li>
<?php
}
?>
</ul>
<?php
}
?>
</li>
<?php
}
?>
</ul>
Did anyone have any ideas for this?
I really appreciate all the help.
Well, this is working b
<i class="<?php $this->Html->_($value['name']);?>"></i>
because there is name attribute is very first base URI
$base_uri => [
'name' => $this->_('Navigation.getprimaryclient.nav_dashboard'),
'active' => false
],
if you add icon as well, it will work
$base_uri => [
'name' => $this->_('Navigation.getprimaryclient.nav_dashboard'),
'active' => false,
'icon' => 'fa fa-cloud'
],
Hope this helps.
Related
I'm trying to render a Nav bar (from _tabs.php) onto index.php (view) the controller that is being used is ImportController.php. the _tabs.php file uses the client_id which is basically the function to get the client ID so it can appropriately create the URL with an ID in it. The issue that I'm getting is Trying to get property 'id' of non-object
index.php (view)
<?php
use yii\bootstrap\Html;
use common\components\ActiveForm;
use common\models\User;
use common\models\Client;
$Client= null;
$this->title = 'Import Offline Data Capture data';
?>
<!-- capture partial Nav -->
<br>
<?php if(in_array(Yii::$app->user->identity->role, User::MHM_ROLES)): ?>
<?= $this->render('/client/_tabs', ['Client' => $Client]); ?>
<?php endif; ?>
<?php if(in_array(Yii::$app->user->identity->role, User::CLIENT_ROLES)): ?>
<?= $this->render('//client/partialNavs/appendNav', ['Client' => $Client]); ?>
<?php endif; ?>
<div class="page-header">
<h2>Import data</h2>
</div>
<div class="row">
<div class="col-md-6">
<div class="panel panel-default">
<div class="panel-body" id="survey-import-container">
<h4 class="text-info">Please select a file to import</h4>
<?php if(count($ImportForm->getErrors('dataErrors'))): ?>
<div class="alert alert-warning">
<p><strong>Sorry, we were unable to process your import. Please revise the following errors and try again:</strong><p><br />
<ul>
<?php foreach($ImportForm->getErrors('dataErrors') as $e): ?>
<li><?= $e; ?></li>
<?php endforeach; ?>
</ul>
</div>
<?php endif; ?>
<p>The file must follow the exported template, and must be a XLSX document with a maximum of 10,000 rows.</p>
<?php $form = ActiveForm::begin([
'id' => 'import-form',
'options' => [
'enctype' => 'multipart/form-data',
'class' => 'clearfix',
]
]) ?>
<?= $form->field($ImportForm, 'importFile')->fileInput() ?><hr />
<?= Html::submitButton('<span class="glyphicon glyphicon-import"></span> Import & Process Data', ['class' => 'btn btn-primary col-md-6', 'id' => 'import-data-btn']); ?>
<?= Html::a('<span class="glyphicon glyphicon-repeat"></span> Reset', ['import/index'], ['class' => 'btn btn-link col-md-6']); ?>
<?php ActiveForm::end() ?>
<div class="alert alert-danger" style="margin-top: 20px;">Please note: This application does not store any of your imported data. Keep your original spreadsheet to avoid losing data.</div>
</div>
</div>
</div>
</div>
ImportController.PHP
<?php
namespace admin\controllers;
use Yii;
use yii\filters\AccessControl;
use yii\web\UploadedFile;
use admin\components\Controller;
use admin\models\ImportForm;
use common\models\User;
use common\models\Client;
class ImportController extends Controller
{
public function behaviors()
{
return [
'access' => [
'class' => AccessControl::className(),
'rules' => [
[
'allow' => true,
'actions' => ['index'],
// All actions are access controlled.
'roles' => [
User::ROLE_MHM_ADMIN,
User::ROLE_MHM_USER,
User::ROLE_CLIENT_ADMIN,
User::ROLE_CLIENT_USER,
]
],
],
],
];
}
public function actionIndex($client_id = null)
{
// Get client
$Client = $this->getClient($client_id);
// Ensure client exists for logged in user
if(is_null($Client)) {
throw new BadRequestHttpException('This page does not exist.');
}
$ImportForm = new ImportForm;
// Form posted, validate
if(Yii::$app->request->isPost) {
$ImportForm->importFile = UploadedFile::getInstance($ImportForm, 'importFile');
// Process upload
$ImportForm->upload();
}
return $this->render('index', array(
'ImportForm' => $ImportForm,
));
}
public function actionRenderSuccess()
{
return $this->renderPartial('_success');
}
private function getClient($id, $restriction = null)
{
if(Yii::$app->user->identity->client_id)
{
$id = Yii::$app->user->identity->client_id;
}
$ClientQuery = Client::find()
->andWhere(['id' => $id]);
if ($restriction == 'patronbase') {
$ClientQuery->andWhere(['license_type' => Client::LICENSE_PATRONBASE]);
} else if ($restriction == 'live') {
$ClientQuery->andWhere(Client::LIVE_OR_UPGRADING_CONDITION);
}
$Client = $ClientQuery->one();
if(is_null($Client))
{
throw new NotFoundHttpException('');
}
return $Client;
}
}
_tabs.php
<?php
use yii\bootstrap\Html;
use common\models\Client;
use common\models\User;
use common\models\SurveyInstance;
use common\models\Consent;
use yii\bootstrap\Tabs;
use yii\bootstrap\Nav;
if (Yii::$app->user->isGuest) return;
$getRoute = function($route, $clientParamName, $otherParams = []) use ($Client)
{
$routeParams = [$route];
if (!isset(Yii::$app->user->identity->client_id)) {
$routeParams[$clientParamName] = $Client->id;
}
return array_merge($routeParams, $otherParams);
};
$route = Yii::$app->controller->module->requestedRoute;
$mhmOrClientAdmin = in_array(Yii::$app->user->identity->role, [User::ROLE_MHM_ADMIN, User::ROLE_MHM_USER, User::ROLE_CLIENT_ADMIN]);
$mhmUser = in_array(Yii::$app->user->identity->role, User::MHM_ROLES);
$urlsForConsentSurveyTypes = Consent::getUrlForSurveyTypes();
$items = [
[
'label' => 'Checkout / Enrich',
'url' => $getRoute('dashboard/mhm-rels-dashboard', 'client_id'),
'active' => in_array($route, [
'dashboard/mhm-rels-dashboard',
'survey-instance/api-logs',
'client/activity',
'client/update',
'client/api-settings'
]) || ($route =='consent/index' && Yii::$app->request->get('type')=='cs-tag-tool-consent'),
'encode' => false,
'visible' => $Client->isFullOrUpgrading,
],
[
'label' => 'Checkout / Enrich',
'url' => $getRoute('dashboard/patronbase-dashboard', 'client_id'),
'active' => in_array($route, [
'dashboard/mhm-rels-dashboard',
'dashboard/patronbase-dashboard',
'survey-instance/api-logs',
'client/activity',
'client/update',
'client/api-settings',
'client/patronbase-settings'
]) || ($route =='consent/index' && Yii::$app->request->get('type')=='cs-tag-tool-consent'),
'encode' => false,
'visible' => $Client->license_type === Client::LICENSE_PATRONBASE,
],
[
'label' => 'Capture',
'url' => $getRoute('dashboard/capture-dashboard', 'client_id'),
'active' => in_array($route, [
'dashboard/capture-dashboard',
'client/survey-settings',
'consent/create',
'consent/update',
'question/index',
'client/legal',
'question/create',
'question/update'
]) || ($route =='consent/index' && Yii::$app->request->get('type')=='capture-consent'),
'encode' => false,
],
[
'label' => 'Append',
'url' => $getRoute('dashboard/append-dashboard', 'client_id'),
'active' => in_array($route, [
'dashboard/append-dashboard',
'client/append-settings',
'import/index'
]),
'encode' => false,
],
//Info
[
'label' => '<span class="glyphicon glyphicon-stats"></span> Info',
'options' => ['class' => 'pull-right'],
'active' => in_array($route, [
'client/stats',
'client/survey-urls',
]),
'encode' => false,
'items' => [
[
'label' => '<span class="glyphicon glyphicon-stats"></span> Stats',
'url' => $getRoute('client/stats', 'client_id'),
'active' => in_array($route, ['client/stats',]),
'encode' => false,
'visible' => $mhmOrClientAdmin,
],
[
'label' => '<span class="glyphicon glyphicon-file"></span> Guides',
'url' => '/guides/' . $Client->hash,
'encode' => false,
'linkOptions' => [ 'target' => '_blank'],
'visible' => $Client->isFullOrUpgrading,
],
[
'label' => '<span class="glyphicon glyphicon-link"></span> Survey URLs',
'url' => $mhmUser ? ['client/survey-urls', 'client_id' => $Client->id] : ['client/survey-urls'],
'encode' => false,
],
],
],
//Settings
[
'label' => '<span class="glyphicon glyphicon-cog"></span> Account settings',
'options' => ['class' => 'pull-right'],
'active' => in_array($route, [
'client/anonymisation',
'contact/index',
'contact/update',
'contact/create',
'contact/delete',
'user/index',
'user/create-update',
]),
'encode' => false,
'items' => [
[
'label' => '<span class="glyphicon glyphicon-erase"></span> Anonymisation',
'url' => $getRoute('client/anonymisation', 'id'),
'active' => in_array($route, ['client/anonymisation']),
'encode' => false,
],
[
'label' => '<span class="glyphicon glyphicon-envelope"></span> Email List',
'url' => $getRoute('contact/index', 'client_id'),
'active' => in_array($route, [
'contact/index',
'contact/update',
'contact/create',
'contact/delete',
]),
'encode' => false,
],
[
'label' => '<span class="glyphicon glyphicon-user"></span> Users <span class="badge">'.count($Client->clientUsers).'</span>',
'url' => $getRoute('user/index', 'client_id'),
'active' => in_array($route, [
'user/index',
'user/create-update',
]),
'encode' => false,
'visible' => $mhmOrClientAdmin,
],
],
],
];
echo Nav::widget([
'options' => [
'class' => 'nav nav-pills',
'id'=>'nav-bar',
],
'items' => $items,
]);
?>
<style>
#nav-bar {
background-color: aliceblue
}
</style>
Hope this answer will help:
return $this->render('index', array(
'ImportForm' => $ImportForm,
'Client' => $Client
));
Focus on your Index action on ImportController. I think you forgot to pass that $Client to index.php.
Also, remove $Client= null; in your view file (index.php) above $this->title;
I want to increase the depth int each time children are in a item so I can pad out the a tag.
Below is my code and I assumed this would work, however the number stays at 1 even though I have got children within my one of the items within $items.
sidebar.blade.php
<nav class="flex flex-col mt-10">
<ul class="pl-4">
#foreach($items as $item)
<x-layouts.sidebar.items :item="$item"></x-layouts.sidebar.items>
#endforeach
</ul>
</nav>
sidebar.items.blade.php
<li>
#if(count($item) > 0)
<a href="{{ $item['href'] }}" class="focus:text-blue-500 dark-focus:text-blue-400 focus:outline-none w-full transition duration-500 ease-in-out pl-4 py-2 text-gray-700 dark:text-gray-400 hover:bg-blue-200 dark-hover:bg-blue-500 transition duration-500 ease-in-out block">
{{ $item['text'] }} {{ $depth }}
</a>
#if (count($item['children']) > 0)
<ul class="pl-4">
#foreach($item['children'] as $child)
<x-layouts.sidebar.items :item="$child" :depth="$loop->parent->index"></x-layouts.sidebar.items>
#endforeach
</ul>
#endif
#else
<hr>
#endif
</li>
Sidebar\Items.php
<?php
namespace App\View\Components\Layouts\Sidebar;
use Illuminate\View\Component;
use Illuminate\View\View;
class Items extends Component
{
/**
* #var array
*/
public $item;
/**
* #var int
*/
public $depth;
/**
* Create a new component instance.
*
* #param array $item
* #param int $depth
*/
public function __construct($item = [], $depth = 1)
{
$this->item = $item;
$this->depth += $depth;
}
/**
* Get the view / contents that represent the component.
*
* #return View|string
*/
public function render()
{
return view('components.layouts.sidebar.items');
}
}
Data:
$this->items = [
[ 'href' => '/home', 'text' => 'Home', 'children' => [], 'active' => 'border-l-2 border-blue-500' ],
[ 'href' => 'javascript:void(0)', 'text' => 'Test', 'children' => [], 'active' => '' ],
[ 'href' => 'javascript:void(0)', 'text' => 'Websites', 'children' => [], 'active' => '' ],
[ 'href' => 'javascript:void(0)', 'text' => 'Websites', 'children' => [], 'active' => '' ],
[],
[
'href' => '/administration',
'text' => 'Administration',
'children' => [
[
'href' => 'javascript:void(0)',
'text' => 'Locked Devsites',
'active' => '',
'children' => []
]
],
'active' => ''
],
[ 'href' => 'javascript:void(0)', 'text' => 'Documentation', 'children' => [], 'active' => '' ],
[ 'href' => 'javascript:void(0)', 'text' => 'Logout', 'children' => [], 'active' => '' ]
];
Result:
Home 1
Test 1
Websites 1
Websites 1
Administration 1
Locked Devsites 5
Documentation 1
Logout 1
If I get it right what you want to achieve, you don't even need the $depth property, since the blade's #foreach directive has its own depth property which tells you how nested you are.
In your code, instead using:
:depth="$depth"
use:
:depth="$loop->depth"
hi all i'm a noob of yii and i'm trying to get the kartiks to work, but I can't get them to load the dependency.I'm trying to make the kartik work but I can't get it to load the dependency, if I see the calls that are made through yii's built-in debugging the scream that is present in the 'URL' parameter is not really computed, I've also tried to write it fixed but it's not really thought.
If I do a simple echo, however, it comes back correct.
<?=$form->field($model, 'name')->
widget(Select2::classname(), ['data' => $listdataA,
'id' => 'invoice-name',
'options' => ['placeholder' => 'Seleziona anagrafica ...', 'id' => 'lvl-0',],
'pluginOptions' => [
'allowClear' => true
],
'pluginEvents' => [
'select2:select' => new JsExpression("function (e) {
var id=e.params.data.id;
$.get('index.php?r=invoice/get-location-address', {id: id}, function(data) {
if (data !== null) {
document.getElementById('piva').value=data.PIVA;
document.getElementById('indi').value=data.Indirizzo;
} else {
//if data wasn't found the alert.
alert('We\'re sorry but we couldn\'t load the the location data!');
}
});
}")]
]);
?>
<?= $form->field($model, 'attn')->textInput(['maxlength' => true, 'placeholder' => 'ATTN', 'id' => 'piva'])->label(false) ?>
<?= $form->field($model, 'address')->textarea(['rows' => 6, 'placeholder' => 'Address', 'id' => 'indi'])->label(false) ?>
<?php
echo $form->field($model, 'cd_contact')->widget(DepDrop::classname(), [
'options' => ['placeholder' => 'Select ...'],
'type' => DepDrop::TYPE_SELECT2,
'select2Options' => ['pluginOptions' => ['allowClear' => true]],
'pluginOptions' => [
'depends' => [Html::getInputId($model, 'name')], //['lvl-0'],
'url' => Url::to(['/contact/list']),
'loadingText' => 'caricamento dati ...',
]
]);
?>
in the controller
public function actionList() {
Yii::$app->response->format = \yii\web\Response::FORMAT_JSON;
$out = [];
if (isset($_POST['depdrop_parents'])) {
$id = end($_POST['depdrop_parents']);
$list = Contact::find()->andWhere(['id_ana_ref' => $id])->asArray()->all();
var_dump($list);
$selected = null;
if ($id != null && count($list) > 0) {
$selected = '';
foreach ($list as $i => $account) {
$out[] = ['id' => $account['id_contact'], 'name' => $account['Name']];
if ($i == 0) {
$selected = $account['id_contact'];
}
}
// Shows how you can preselect a value
return ['output' => $out, 'selected' => $selected];
}
}
solved if you put any java on kartick they avoid standard code
solution
<?=
$form->field($model, 'name')->
widget(Select2::classname(), ['data' => $listdataA,
'id' => 'invoice-name',
'options' => ['placeholder' => 'Seleziona anagrafica ...' ,'id' => 'lvl-0',],
'pluginOptions' => [
'allowClear' => true
],
]);
?>
<?= $form->field($model, 'attn')->textInput(['maxlength' => true, 'placeholder' => 'ATTN','onclick'=>'magsearch()', 'id' => 'piva'])->label(false) ?>
<?= $form->field($model, 'address')->textarea(['rows' => 6, 'placeholder' => 'Address', 'id' => 'indi'])->label(false) ?>
<?php
// $url = \yii\helpers\Url::to(['index.php?r=contact/list']);
echo $form->field($model, 'cd_contact')->widget(DepDrop::classname(), [
'data' => $datac,
'options' => ['placeholder' => 'carico ...'],
'type' => DepDrop::TYPE_SELECT2,
'select2Options' => ['pluginOptions' => ['allowClear' => true]],
'pluginOptions' => [
'depends' => ['lvl-0'],
'url' => Url::to(['/contact/list']),
// 'params' => ['lvl-0'],
'loadingText' => 'caricamento dati ...',
]
]);
?>
I'm using Kartik DepDrop widget for dropdown options. I've successfully show the options.
But I got an error in my firebug console like this
TypeError: invalid 'in' operand obj
Here is my code:
View:
<?php
<div class="pib-data-form">
<?php $form = ActiveForm::begin(); ?>
<?php echo $form->field($model, 'transaction_type')->dropDownList(PibTransactionType::getOptions(), ['id' => 'parent_id']); ?>
<?=
$form->field($model, 'doc_type')->widget(DepDrop::classname(), [
'type' => DepDrop::TYPE_SELECT2,
'options' => ['id' => 'first_child_id'],
'pluginOptions' => [
'depends' => ['parent_id'],
'placeholder' => 'Select...',
'url' => Url::to(['pib-data/document-type'])
]
]);
?>
<?php
echo FileInput::widget([
'name' => 'file_uploads',
'language' => 'id',
'options' => [
'accept' => 'doc/*', 'file/*',
'multiple' => true,
'enableLabel' => true,
],
'pluginOptions' => [
'allowedFileExtensions' => ['xls', 'xlsx'],
'uploadUrl' => Url::to(['/pib/pib-data/create']),
]
]);
?>
<?php ActiveForm::end(); ?>
</div>
<?php
$this->registerJS("
$('#w1').on('fileuploaded', function(event, data, previewId, index) {
var response = data.response;
$(location).attr('href', response.url);
}
);", View::POS_END);
Controller:
public function actionDocumentType() {
$out = [];
if (isset($_POST['depdrop_parents'])) {
$parents = $_POST['depdrop_parents'];
if ($parents != null) {
$parent_id = $parents[0];
$out = PibDocumentType::getOptionsbyTransactionType($parent_id);
echo Json::encode(['output' => $out, 'selected' => '']);
return;
}
}
echo Json::encode(['output' => '', 'selected' => '']);
}
Model:
TransactionType.php
public static function getOptions(){
$data= static::find()->all();
$value=(count($data)==0)? [''=>'']: \yii\helpers\ArrayHelper::map($data, 'id','name');
return $value;
}
DocumentType.php
public static function getOptionsbyTransactionType($parent_id) {
$data = static::find()->where(['transaction_type_id'=>$parent_id])->select(['id','name'])->asArray()->all();
$value = (count($data) == 0) ? ['' => ''] : $data;
return $value;
}
What does the error mean and how can I fix it?
I have been trying to understand this existing php code that displays drop down menus with their subsequent menus. while the code works in one level, i am having a hard time how to or what to add another level of the dropdown... i have been able to do that but in this case where php is used to display these fields, it's kind of mind-boggling for me... here's the existing code in the view side -->
<ul class="nav navbar-nav">
<?php
foreach ($nav as $item) {
if (empty($item['children'])) {
?>
<li<?php if (!empty($item['is_active'])) { ?> class="active"<?php } ?>>
<a href="<?php echo $item['link']; ?>"><?php if ($item['icon'] != '') { ?>
<i class="<?php echo $item['icon']; ?>" data-toggle="tooltip" data-placement="bottom" data-original-title="A large tooltip."></i> <?php } echo $item['label']; ?></a></li>
<?php
}
else
{
?>
<li class="dropdown <?php if (!empty($item['is_active'])) { ?> active<?php } ?>">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown">
<?php if ($item['icon'] != '') { ?>
<i class="<?php echo $item['icon']; ?>"></i>
<?php echo $item['label']; ?>
<b class="caret"></b><?php } ?>
</a>
<ul class="dropdown-menu">
<?php
_main_menu_widget_display_children($item['children']);
?>
</ul>
</li>
<?php
}
}
?>
and the controller looks like this -->
$nav['settings'] = array('label' => 'Settings', 'icon' => 'fa fa-wrench fa-lg', );
$nav['settings/access_rights'] = array('label' => 'Approver', 'icon' => 'fa fa-wrench fa-lg',
'location' => site_url('admin/access_rights'), 'parent_id' => 'settings');
//separator
$nav['settings/separator_1'] = array('blank' => true, 'parent_id' => 'settings');
$nav['settings/billing_param'] = array('label' => 'Technician', 'icon' => 'fa fa-wrench fa-lg',
'location' => site_url('billing_param'), 'parent_id' => 'settings');
//separator
$nav['settings/separator_2'] = array('blank' => true, 'parent_id' => 'settings');
$nav['settings/support_settings'] = array('label' => 'Support', 'icon' => 'fa fa-wrench fa-lg',
'location' => site_url('support_settings'), 'parent_id' => 'settings');
//sub-menu sub of Support
$nav['example1'] = array('label' => 'Request Supportt', 'icon' => 'fa fa-wrench fa-lg',
'location' => '#', 'parent_id' => 'settings/support_settings');
$nav['example2'] = array('label' => 'Need Features', 'icon' => 'fa fa-wrench fa-lg',
'location' => '#', 'parent_id' => 'settings/support_settings');
$nav['example3'] = array('label' => 'Telephone Number', 'icon' => 'fa fa-wrench fa-lg',
'location' => '#', 'parent_id' => 'settings/support_settings');
$nav['example4'] = array('label' => 'Testimonials', 'icon' => 'fa fa-wrench fa-lg',
'location' => '#', 'parent_id' => 'settings/support_settings');
$nav['example6'] = array('label' => 'Known Issues', 'icon' => 'fa fa-wrench fa-lg',
'location' => '#', 'parent_id' => 'settings/support_settings');
$nav['example5'] = array('label' => 'Road Map', 'icon' => 'fa fa-wrench fa-lg',
'location' => '#', 'parent_id' => 'settings/support_settings');
here's what it looks like :
i just wanted those list under 'support' not shown when i clicked the 'settings' menu but rather after i hover or clicked (it doesnt matter really) the 'support' sub-menu...
i know there's something missing in the 'view' side but i dont know what is... another if-else maybe but i cant see any connection so far... any help is very much appreciated thanks... :)