site/fields/subpagelist/subpagelist.php
/**
   * Generate field content markup
   *
   * @return string
   */
Generate field content markup
@return string
Generate field content markup @return string
public function content() {
    $wrapper = new Brick('div');
    $wrapper->addClass('subpagelist');
    $children = $this->subpages();
    $limit = ($this->limit()) ? $this->limit() : 10000;
    $children = $children->paginated('sidebar');
    $pagination = new Snippet('pagination', array(
      'pagination' => $children->pagination(),
      'nextUrl'    => $children->pagination()->nextPageUrl(),
      'prevUrl'    => $children->pagination()->prevPageUrl(),
    ));
    $subpages = new Snippet('pages/sidebar/subpages', array(
      'title'      => $this->i18n($this->label),
      'page'       => $this->page(),
      'subpages'   => $children,
      'addbutton'  => $this->page->addButton(),
      'pagination' => $pagination,
    ));
    $wrapper->html(tpl::load(__DIR__ . DS . 'template.php', array('subpages' => $subpages)));
    return $wrapper;
  }
public function content ( ) { $ wrapper = new Brick ( 'div' ) ; $ wrapper -> addClass ( 'subpagelist' ) ; $ children = $ this -> subpages ( ) ; $ limit = ( $ this -> limit ( ) ) ? $ this -> limit ( ) : 10000 ; $ children = $ children -> paginated ( 'sidebar' ) ; $ pagination = new Snippet ( 'pagination' , array ( 'pagination' => $ children -> pagination ( ) , 'nextUrl' => $ children -> pagination ( ) -> nextPageUrl ( ) , 'prevUrl' => $ children -> pagination ( ) -> prevPageUrl ( ) , ) ) ; $ subpages = new Snippet ( 'pages/sidebar/subpages' , array ( 'title' => $ this -> i18n ( $ this -> label ) , 'page' => $ this -> page ( ) , 'subpages' => $ children , 'addbutton' => $ this -> page -> addButton ( ) , 'pagination' => $ pagination , ) ) ; $ wrapper -> html ( tpl :: load ( __DIR__ . DS . 'template.php' , array ( 'subpages' => $ subpages ) ) ) ; return $ wrapper ; }
Generate field content markup
 @return string
Generate field content markup @return string
// add pagination to the subpages // use existing snippet to build the list // @see /panel/app/src/panel/models/page/sidebar.php // use template with defined vars