BookStack/resources/views/pages/page-tree-list.blade.php
2015-07-23 21:55:46 +01:00

15 lines
No EOL
560 B
PHP

{{--Requires an array of pages to be passed as $pageTree--}}
<ul class="nested-page-list">
@foreach($pageTree as $subPage)
<li @if($subPage['hasChildren'])class="has-children"@endif>
@if($subPage['hasChildren'])
<i class="fa fa-chevron-right arrow"></i>
@endif
<a href="{{$subPage['url']}}">{{$subPage['name']}}</a>
@if($subPage['hasChildren'])
@include('pages/page-tree-list', ['pageTree' => $subPage['pages']])
@endif
</li>
@endforeach
</ul>