Beispiel #1
0
 static function details()
 {
     //	Base object
     $_d = parent::_details();
     //	Basic details; describe the template for the user
     $_d->label = 'Redirect';
     $_d->description = 'Redirects to another URL.';
     // --------------------------------------------------------------------------
     //	Additional fields
     $_d->additional_fields = array();
     $_d->additional_fields[0] = array();
     $_d->additional_fields[0]['type'] = 'dropdown';
     $_d->additional_fields[0]['key'] = 'redirect_page_id';
     $_d->additional_fields[0]['label'] = 'Redirect To Page';
     $_d->additional_fields[0]['class'] = 'chosen';
     $_d->additional_fields[0]['options'] = array('None') + get_instance()->cms_page_model->get_all_nested_flat();
     $_d->additional_fields[1] = array();
     $_d->additional_fields[1]['type'] = 'text';
     $_d->additional_fields[1]['key'] = 'redirect_url';
     $_d->additional_fields[1]['label'] = 'Redirect To URL';
     $_d->additional_fields[1]['placeholder'] = 'Manually set the URL to redirect to, this will override any option set above.';
     $_d->additional_fields[1]['tip'] = 'URLs which do not begin with http(s):// will automatically be prefixed with ' . site_url();
     $_d->additional_fields[2] = array();
     $_d->additional_fields[2]['type'] = 'dropdown';
     $_d->additional_fields[2]['key'] = 'redirect_code';
     $_d->additional_fields[2]['label'] = 'Redirect Type';
     $_d->additional_fields[2]['class'] = 'chosen';
     $_d->additional_fields[2]['options'] = array('302' => '302 Moved Temporarily', '301' => '301 Moved Permanently');
     // --------------------------------------------------------------------------
     return $_d;
 }
Beispiel #2
0
 static function details()
 {
     //	Base object
     $_d = parent::_details();
     //	Basic details; describe the template for the user
     $_d->label = 'Full Width';
     $_d->description = 'A full width template';
     //	Widget areas; give each a unique index, the index will be passed as
     //	the variable to the view
     $_d->widget_areas['mainbody'] = parent::_editable_area_template();
     $_d->widget_areas['mainbody']->title = 'Main Body';
     // --------------------------------------------------------------------------
     return $_d;
 }