Giter Site home page Giter Site logo

Comments (5)

schmunk42 avatar schmunk42 commented on May 24, 2024

Please provide an example showing the error.

from yii2-adminlte-asset.

Shokhrukh2606 avatar Shokhrukh2606 commented on May 24, 2024

It shows any errors on console, but not opening
image
image
And array passed to menu widget:

    [
        'label' => 'Same tools',
        'icon' => 'fa fa-share',
        'url' => '#',
        'options'=>['class'=>'treeview'],
        'items' => [
            [
                'label' => 'Level One',
                'icon' => 'fa fa-circle-o',
                'url' => '#',
            ],
            [
                'label' => 'Level One',
                'icon' => 'fa fa-circle-o',
                'url' => '#',
            ],
        ],
    ] 

from yii2-adminlte-asset.

schmunk42 avatar schmunk42 commented on May 24, 2024

Which version do you use?

Did you try the example views?
https://github.com/dmstr/yii2-adminlte-asset/blob/master/example-views/yiisoft/yii2-app/layouts/left.php#L12

from yii2-adminlte-asset.

Shokhrukh2606 avatar Shokhrukh2606 commented on May 24, 2024

I am using version ~2.3.0, I also tried example that you gave but didn't work

from yii2-adminlte-asset.

Shokhrukh2606 avatar Shokhrukh2606 commented on May 24, 2024

I tried to use as example in pages it worked properly

<ul class="sidebar-menu" data-widget="tree">
            <li class="header">MAIN NAVIGATION</li>
            <?php foreach ($menu as $item) {
                if (isset($item['items'])) { ?>
                    <li class="treeview">
                        <a href="#">
                            <i class="<?=$item['icon']?>"></i> <span><?= $item['label'] ?></span>
                            <span class="pull-right-container">
                                <i class="fa fa-angle-left pull-right"></i>
                            </span>
                        </a>
                        <ul class="treeview-menu">
                            <?php foreach ($item['items'] as $child) { ?>
                                <li><a href="<?=Url::to($child['url'])?>"><i class="<?=$child['icon']?>"></i> <?=$child['label']?></a></li>
                            <?php } ?>
                        </ul>
                    </li>
            <?php } else {
                    $icon=HTML::tag('i','',['class'=>(isset($item['icon'])) ? $item['icon'] : '']);
                    echo  Html::tag('li', Html::a($icon.$item['label'], (isset($item['url'])) ? $item['url'] : ''));
                    // echo Html::tag('li', Html::a($item['label'], (isset($item['url']))?$item['url']:'' ), (isset($item['options']))?$item['options']:'');
                }
            } ?>

        </ul>

but it is a bit hard-coded. Is it correct, if correct you can close this issue))

from yii2-adminlte-asset.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.