Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The link template options cannot be overwritten #3

Closed
ghost opened this issue May 8, 2016 · 4 comments
Closed

The link template options cannot be overwritten #3

ghost opened this issue May 8, 2016 · 4 comments
Labels

Comments

@ghost
Copy link

ghost commented May 8, 2016

Hi, i am trying to add data-pjax="0" to the link, could you fix this error?
Thank you


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@ilgiz-badamshin
Copy link

ilgiz-badamshin commented Jun 21, 2016

Also need possibility to override parent item template, it is hardcoded:
'<a href="{url}" class="kv-toggle">{icon}{label}</a>'

@Nayank9
Copy link

Nayank9 commented Aug 31, 2016

Navigation side bar not showing correctly.

`

beginPage() ?> <title>title) ?></title> head() ?> beginBody() ?> 'Home', 'url' => ['/site/index']],_/ /_['label' => 'Contact', 'url' => ['/site/contact']],_/ ]; if (Yii::$app->user->isGuest) {
    //$menuItems[] = ['label' => 'Enquiry', 'url' => ['/site/acenquiry']];
    $menuItems[] = ['label' => 'Signup', 'url' => ['/site/signup']];
    $menuItems[] = ['label' => 'Login', 'url' => ['/site/login']];
} else {
    //print_r(Yii::$app->user->id);

    $menuItems[]=[
        'label'=>'Dashboard',
        'url'=>['/site/dashboard','date'=>'1','status'=>'0'],          
    ];
    $menuItems[]=['label' => 'View',
       'items' => [
           ['label' => 'Companies',
            'url' => ['/company']
           ],
           ['label' => 'Projects', 
            'url' => ['/project']
           ],
           ['label' => 'Documents', 
            'url' => ['/quotedocs']
           ],
           ['label' => 'Quotations', 
            'url' => ['/quotations']
           ],
           ['label' => 'Payments', 
            'url' => ['/grptankpayment']
           ],
       ],
       ];
    $menuItems[]=['label' => 'Configuration',
   'items' => [
       ['label' => 'Status Types',
        'url' => ['/status']
       ],
       ['label' => 'Document Types', 
        'url' => ['/doctype']
       ],
       ['label' => 'Task Types', 
        'url' => ['/tasktype']
       ],
   ],
   ];
    $menuItems[]=['label' => 'GRP',
   'items' => [
       ['label' => 'GRP Panels',
        'url' => ['/grptankpanels']
       ],
       ['label' => 'GRP Tools', 
        'url' => ['/grptanktools']
       ],
       ['label' => 'GRP Main Accessories', 
        'url' => ['/grptankaccessories']
       ],
       ['label' => 'GRP Sub Accessories', 
        'url' => ['/grptanksubaccessories']
       ],
   ],
   ];
    $menuItems[]=[
        'label'=>'Company',
        'url'=>['/company/create'],
        'linkOptions' => ['data-method' => 'post']            
    ];
    $menuItems[]=['label' => 'Project',
    'items' => [
        ['label'=>'Create Project',
        'url'=>['/project/create'], 
        ],
        ['label'=>'Project Execution',
        'url'=>['/project-execution/create'], 
        ],         
    ],
    ];
    $menuItems[] = [
        'label' => 'Quotation',
        'url' => ['/quotations/create'],
        'linkOptions' => ['data-method' => 'post']
    ];
    $menuItems[]=[
        'label'=>'Sekisui',
        'url'=>['/grptanksekisui/create'],
        'linkOptions' => ['data-method' => 'post']            
    ];

    $menuItems[] = [
        'label' => 'Docs',
        'url' => ['/quotedocs/create'],
        'linkOptions' => ['data-method' => 'post']
    ];

    $menuItems[] = [
        'label' => 'Payments',
        'url' => ['/grptankpayment/create'],
        'linkOptions' => ['data-method' => 'post']
    ];
    $menuItems[] = [
        'label' => 'My Tasks',
        'url' => ['/task'],
        'linkOptions' => ['data-method' => 'post']
    ];
    $menuItems[] = [
        'label' => 'Logout (' . Yii::$app->user->identity->username . ')',
        'url' => ['/site/logout'],
        'linkOptions' => ['data-method' => 'post']
    ];
}
/*echo Nav::widget([
    'options' => ['class' => 'navbar-nav navbar-right'],
    'items' => $menuItems,
]);*/

?>

<div class="container">
 <?php echo SideNav::widget([      
  'encodeLabels' => false,     
  'items' => $menuItems,
   'type' => SideNav::TYPE_PRIMARY
  ]); ?>
    <?= Breadcrumbs::widget([
        'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : [],
    ]) ?>
    <?= Alert::widget() ?>
    <?= $content ?>
</div>

© Test Company

</div>
endBody() ?> endPage() ?>` Getting outpu: ![nav error](https://cloud.githubusercontent.com/assets/10756156/18123565/111bcce6-6f8c-11e6-86d3-7b1c0b07ba5b.png) Expected Output: ![nav1](https://cloud.githubusercontent.com/assets/10756156/18123566/111e12c6-6f8c-11e6-8a48-4b0139e8de69.png)

@ilgiz-badamshin
Copy link

Nayank9, try wrap sidebar and content in divs:

<div id="container">
    <div id="sidebar-wrapper">
        <?php echo SideNav::widget([...]); ?>
    </div>
    <div id="page-content-wrapper">
        <?= Breadcrumbs::widget([...]) ?>
        <?= Alert::widget() ?>
        <?= $content ?>
    </div>
</div>

and set sidebar width:

#sidebar-wrapper {
    width: 250px;
}

@kartik-v
Copy link
Owner

kartik-v commented Apr 8, 2021

This is resolved in new release v1.0.1. Update.

@kartik-v kartik-v closed this as completed Apr 8, 2021
@kartik-v kartik-v added the bug label Apr 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants