How to show custom text in BREADCRUMB/TITLE BAR PANEL in admin panel for a custom module?
I have a module and I have created my own controller to handle edit,create etc like in create method I am doing
function create(){
parent::create();
}
Here when I see the create screen in admin panel it shows Training Material > Create in breadcrumb / title bar panel. How can I inject custom text.
Thanks
Comments
$crumbs = array('module/uri' => 'labelgoeshere', 'End of Breadcrumb'); $this->fuel->admin->set_titlebar($crumbs);
http://docs.getfuelcms.com/libraries/fuel_admin
You can see in below class I tried your solution in edit method. Don't know what I am missing.
class Cert extends Module {
public $part_id;
function __construct()
{
parent::__construct();
}
function index() {
if(!uri_segment(5) && !ctype_digit(uri_segment(5))){
show_404();
}
$this->items();
}
function items() {
parent::items();
}
function edit() {
if(!uri_segment(5) && !ctype_digit(uri_segment(5))){
show_404();
}
$id = uri_segment(5);
//$crumbs = array('module_uri' => 'deal/certificates', 'End of Breadcrumb');
//$this->fuel->admin->set_titlebar($crumbs);
parent::edit($id);
$crumbs = array('module_uri' => 'deal/certificates', 'End of Breadcrumb');
$this->fuel->admin->set_titlebar($crumbs);
}
/*public function items(){
parent::items();
//echo $this->part_id;
//echo $this->model->db()->last_query();
}*/
public function listing(){
if(!uri_segment(5) && !ctype_digit(uri_segment(5))){
show_404();
}
$this->items();
//$this->part_id = $this->uri->get(5);
//$this->items();
}
Eventually I will have to load view.
I am loving it....
(Are you thinking of changing the admin panel to twitter bootstrap themes?)
$crumbs = array('module/uri' => 'labelgoeshere', 'End of Breadcrumb');
$this->fuel->admin->set_titlebar($crumbs);
$this->fuel->admin->render($this->views['create_edit'], $vars, '', FUEL_FOLDER);
When I add crumb it shows nothing just a ajax loader....what can be the issue?
public function listing(){
if(!uri_segment(5) && !ctype_digit(uri_segment(5))){
show_404();
}
$this->items();
$crumbs = array('module/uri' => 'labelgoeshere', 'End of Breadcrumb');
$this->fuel->admin->set_titlebar($crumbs);
$this->fuel->admin->render($this->views['list'], $vars, '', FUEL_FOLDER);
}
Thanks