@if (isset($user->perm) && isset($res) && ($user->perm['blg_editpost'] || $user->perm['blg_editpage'] || $user->perm['blg_delpost'] || $user->perm['blg_delpage']))
  <?php
    $current = '';
    $slug = '';
    $url = url()->current();
    $url = explode('/', $url);

    if (isset($url[3])) {
      if ($url[3] == 'blog') {
        $current = $res->slug;
        $slug = $res->slug;
      }
      else if (isset($url[4]) && isset($url[5]) && $url[3] == 'video' && $url[4] == 'play') {
        $current = $url[5];
        $slug = $res->vid;
      }
      else {
        foreach (getPagesInMenu() as $i) {
          if ($url[3] == $i['slug']) $current = $url[3];
          $slug = $url[3];
        }
      }
    }
  ?>
  @include('theme.'.env('THEME').'.component.contentedit.content')
  @include('theme.'.env('THEME').'.component.contentedit.video')
@endif
