Index Page
@if(count($previous))
@if(count($previous->children))
{{$previous->heading}}
@else
{{$previous->heading}}
@endif
@endif
@if(count($pandp->parent))
@if(count($pandp->parent->content))
{{$pandp->parent->heading}}
@else
{{$pandp->parent->heading}}
@endif
@else
@if(count($pandp->content))
{{$pandp->heading}}
@else
{{$pandp->heading}}
@endif
@endif
@if(count($pandp->siblings))
@foreach($pandp->siblings as $sibling)
@if($sibling->id != $pandp->id)
@if($sibling->id < $pandp->id)
@if(count($sibling->content))
{{$sibling->heading}}
@else
{{$sibling->heading}}
@endif
@else
@if(count($sibling->content))
{{$sibling->heading}}
@else
{{$sibling->heading}}
@endif
@endif
@else
{{$sibling->heading}}
@endif
@endforeach
@endif
@if(count($pandp->children))
@foreach($pandp->children as $sibling)
@if($sibling->id != $pandp->id)
@if($sibling->id < $pandp->id)
@if(count($sibling->content))
{{$sibling->heading}}
@else
{{$sibling->heading}}
@endif
@else
@if(count($sibling->content))
{{$sibling->heading}}
@else
{{$sibling->heading}}
@endif
@endif
@else
{{$sibling->heading}}
@endif
@endforeach
@endif
@if(count($next))
@if(count($next->content))
{{$next->heading}}
@else
{{$next->heading}}
@endif
@endif