Example #1
0
foreach ($nav as $key => $item) {
    ?>
    <div class="panel panel-default corner-radius" id="<?php 
    echo $item->alias;
    ?>
">
        <div class="panel-heading text-left">
            <h3 class="panel-title"><?php 
    echo $item->name;
    ?>
</h3>
        </div>
        <div class="panel-body text-left">
            <div class="row">
                <?php 
    $NavUrl = NavUrl::find()->where(['nav_id' => $item->id])->orderBy('order asc')->all();
    ?>
                <?php 
    if ($NavUrl) {
        ?>
                    <?php 
        foreach ($NavUrl as $sub_key => $sub_item) {
            ?>
                        <div class="col-md-2 nav-item"><a href="<?php 
            echo $sub_item->url;
            ?>
" target="_blank" data-toggle="tooltip" data-placement="top"
                                                  title="<?php 
            echo $sub_item->description;
            ?>
"><?php 
Example #2
0
 /**
  * Lists all NavUrl models.
  * @return mixed
  */
 public function actionIndex()
 {
     $dataProvider = new ActiveDataProvider(['query' => NavUrl::find()]);
     return $this->render('index', ['dataProvider' => $dataProvider]);
 }