Orkun Posted October 21, 2015 Posted October 21, 2015 Is it possible to make a "Add New" Shortcut-Button on a Custom Admin Page e.g in the ProcessDashboard Module instead on the Sitetree Page?
renobird Posted October 21, 2015 Posted October 21, 2015 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();?> 1
Orkun Posted October 21, 2015 Author Posted October 21, 2015 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:
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now