Hi everyone,
I am currently using the Polpo admin theme with Drupal 6 - I notice there's always lots of scrolling to go down to the bottom of the page in order to use the Save/Preview/Delete menu - I wondered if there's a way to duplicate these buttons at the top of the page (or better yet, in a Block).
I had a look in page.tpl.php and notice that all the main editing of content runs through $content so I can access it via that. I tried copying the html but then you will obviously need the "form action="/node/edit/1" " or whatever particular node you are editing.
Is there a way to achieve this?
Cheers, Garry.
hook_form_alter
The 'Rubik' admin theme by Development seed does this, but I've not looked at how. You could do this by implementing hook_form_alter in a module, like this:
<?php
function mymodulename_form_alter(&$form, $form_state, $form_id) {
if (!empty($form['buttons'])) {
foreach ($form['buttons'] as $name => $button) {
$form["$name-dupe"] = $button;
$form["$name-dupe"]['#weight'] -= 100;
}
}
}
?>
That just copies all the buttons and moves them to the top of the form.