You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							32 lines
						
					
					
						
							1.2 KiB
						
					
					
				
			
		
		
	
	
							32 lines
						
					
					
						
							1.2 KiB
						
					
					
				| <?php | |
| /** | |
|  * Created by Error202 | |
|  * Date: 19.07.2018 | |
|  */ | |
|  | |
| /** | |
|  * @var $this \yii\web\View | |
|  * @var $menu \core\entities\menu\Menu | |
|  */ | |
|  | |
| ?> | |
|  | |
| <ul class="navbar-nav ml-auto"> | |
| 	<?php if (isset($menu->items)): ?> | |
| 	<?php foreach ($menu->items as $item): ?> | |
| 		<li class="<?= $item->isActive() ? 'active' : '' ?> nav-item<?= $item->hasChildren() ? ' dropdown' : '' ?>"> | |
| 			<?php if ($item->hasChildren() && $item->parent_id == 0): ?> | |
| 				<a <?= $item->target ? 'target="'.$item->target.'"' : '' ?> href="<?= $item->getUrl() ?>" class="nav-link dropdown-toggle" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><?= $item->name ?></a> | |
| 				<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink"> | |
| 					<?php $children = $item->children; ?> | |
| 					<?php foreach ($children as $child): ?> | |
| 						<a <?= $child->target ? 'target="'.$child->target.'"' : '' ?> class="dropdown-item" href="<?= $child->url ?>"><?= $child->name ?></a> | |
| 					<?php endforeach; ?> | |
| 				</div> | |
| 			<?php elseif ($item->parent_id == 0): ?> | |
| 				<a <?= $item->target ? 'target="'.$item->target.'"' : '' ?> href="<?= $item->getUrl() ?>" class="nav-link"><?= $item->name ?></a> | |
| 			<?php endif; ?> | |
| 		</li> | |
| 	<?php endforeach; ?> | |
| 	<?php endif; ?> | |
| </ul>
 |