/** * Ajax function - removes an association between a section and a user * makes a view with new data **/ public function remove_section() { $this->use_layout = false; $this->model = new $this->model_class(WaxUrl::get("id")); $section = new CmsSection(Request::get("sect")); $this->model->allowed_sections->unlink($section); $sect = new CmsSection(); $this->all_sections = $sect->all(); $this->use_view = "_list_sections"; }
public function sitemap() { $this->base_url = 'http://' . $_SERVER['HTTP_HOST']; $section = new CmsSection(); $this->sections = $section->all(); $content = new CmsContent("published"); $this->pages = $content->all(); if ($this->use_format == "xml") { header("Content-type: application/xml"); $this->use_layout = false; } }
/** * sort out submenus, set up actions, find all sections * handle posts etc * @return void */ public function controller_global() { unset($this->sub_links["index"]); unset($this->sub_links["create"]); $this->type = $this->action; if ($this->type == "index") { $this->type = "general"; } $this->action = "edit"; $this->all_cms_modules = CmsApplication::get_modules(); $section = new CmsSection(); $this->all_cms_sections = $section->all(); $this->options_setup(); $this->handle_post(); $this->variable_setup(); }
public function sections() { $section = new CmsSection(); return $section->all(); }