<ul class="nav nav-list"> <?php $current_section = Which::section(); ?> {{-- * A - if has no children and is not child * B - if has children * C - if has no children and is a child * * array[A/B] * if C has parent A/B >> array[A/B][C] * * foreach A/B * if A print * if B print * if has C then print --}} @foreach (Auth::accessibleSections() as $section) <li class="{{ ($section->alias === $current_section->alias) ? 'active open' : null }}" > {{-- if has children --}} @if($section->is_fertile && count($section->children) > 0) <a href="#" class="dropdown-toggle"> <b class="arrow fa fa-angle-down"></b> <i class="menu-icon fa fa-{{ $section->icon }}"></i> <span class="menu-text"> {{ $section->title }} </span> </a>
<?php $content_section = Which::section(); $subsections = $content_section->children; ?> @section("head") @parent {{HTML::style(Cdn::asset('/css/content/posts.css'))}} @stop @section('content') <div> @if (Auth::hasPermission('create')) <div class="row"> <a href="{{ URL::route('cms.content.posts.create') }}" class="btn btn-primary"> <span class="icon-plus"></span> {{Lang::get('posts/form.new_post')}} </a> </div> @endif <ul id='sub-section-list'> @foreach($subsections as $section) <li class='sub-section-items'> <a href="{{URL::route('cms.content.show',$section->alias)}}"> <div class='btn btn-app btn-primary sections-button'> {{$section->title}} </div>