Jump to content

"Add New" Shortcut-Button on a Custom Admin Page(ProcessDashboard) instead of the Sitetree Admin Page


Orkun
 Share

Recommended Posts

You can add things to Process Modules fairly easily. In the case of ProcessDashboard, I think you just add your custom code to dashboard.php

A basic example:

// create a button
$addNew = wire('modules')->get('InputfieldButton');
$addNew->attr('id+name', 'add_new');
$addNew->addClass('top_button');
$addNew->attr('value', "Add New");
$addNew->attr('href', 'add/?parent_id=1');

// render the button on the page somewhere.
<?php echo $addNew->render();?>
  • Like 1
Link to comment
Share on other sites

Your approach gives me an "TemplateFile: Unrecognized path" error.

I changed the link part to

$addNew->attr('href',$config->urls->admin.'page/add/?parent_id=1');

so that it work.

But what i want is something like this:

post-3125-0-82661300-1445437986_thumb.pn

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...