<?php
namespace front\view;

class Menu
{
  public static function pages( $pages, $level = 0, $current_page = 0 )
  {
    $tpl = new \Tpl;
    $tpl -> pages         = $pages;
    $tpl -> level         = $level;
    $tpl -> current_page  = $current_page;
    return $tpl -> render( 'menu/pages' );
  }
  
  public static function menu( $menu, $current_page )
  {
    $tpl = new \Tpl;
    $tpl -> menu         = $menu;
    $tpl -> current_page = $current_page;
    return $tpl -> render( 'menu/menu' );
  }
}
