public function get_edit_columns()
 {
     $column_ids = $this->get_option('column_ids');
     if ($column_ids) {
         $cols = explode(',', $column_ids);
         $Template = new PerchTemplate('content/' . $this->regionTemplate(), 'content');
         $out = array();
         foreach ($cols as $col) {
             $col = trim($col);
             $output = false;
             if (strpos($col, '[')) {
                 $parts = explode('[', $col);
                 $col = $parts[0];
                 $output = trim($parts[1], ']');
             }
             $Tag = $Template->find_tag($col, $output);
             if (is_object($Tag)) {
                 $label = $col;
                 if ($Tag->label()) {
                     $label = $Tag->label();
                 }
                 $out[] = array('id' => $col, 'title' => $label, 'Tag' => $Tag);
             } else {
                 $label = $col;
                 if ($label == '_title') {
                     $label = PerchLang::get('Title');
                 }
                 $out[] = array('id' => $col, 'title' => $label, 'Tag' => false);
             }
         }
         return $out;
     }
     return array(array('id' => '_title', 'title' => PerchLang::get('Title'), 'Tag' => false));
 }
 public function template_attribute($id, $opts)
 {
     $attr_vars = PerchSystem::get_attr_vars();
     if (isset($attr_vars[$id])) {
         return $attr_vars[$id];
     }
     if ($id == 'pageTitle' || $id == 'pageNavText') {
         return $this->details[$id];
     }
     $Template = new PerchTemplate('pages/attributes/' . $opts['template'], 'pages');
     $tag = $Template->find_tag($id, false, true);
     if ($tag) {
         $Template->load($tag);
         return $Template->render($this);
     }
     if (isset($this->details[$id])) {
         return $this->details[$id];
     }
     return false;
 }