Exemple #1
0
 public function children()
 {
     parent::children();
     list($orderCol, $orderDirection) = $this->page->getChildOrderingPolicy();
     $manager = App::getFacadeApplication()['boomcms.template.manager'];
     $templates = $manager->getValidTemplates();
     // Create the main view with the basic settings
     $v = view("{$this->viewPrefix}/children", ['default_child_template' => $this->page->getDefaultChildTemplateId(), 'templates' => $templates, 'child_order_column' => $orderCol, 'child_order_direction' => $orderDirection, 'allowAdvanced' => $this->allowAdvanced, 'page' => $this->page]);
     // If we're showing the advanced settings then set the neccessary variables.
     if ($this->allowAdvanced) {
         // Add the view for the advanced settings to the main view.
         $v->default_grandchild_template = $this->page->getGrandchildTemplateId() != 0 ? $this->page->getGrandchildTemplateId() : $this->page->getTemplateId();
     }
     return $v;
 }
Exemple #2
0
 public function sort_children()
 {
     parent::children();
     Bus::dispatch(new ReorderChildPages($this->page, $this->request->input('sequences')));
 }