2011-01-10, 07:15:51
For my I18N plugin I needed to call the edit page in a way that some meta data was prefilled.
In order to do this, I needed to patch the admin/edit.php:
It would be nice to include this in the next release to allow plugins to prepopulate fields to simplify the use of the CMS.
In order to do this, I needed to patch the admin/edit.php:
Code:
...
if ($id)
{
...
}
else
{
// --- add the following lines
if (isset($_GET['parent'])) $parent = $_GET['parent'];
if (isset($_GET['template'])) $template = $_GET['template'];
if (isset($_GET['metak'])) $metak = $_GET['metak'];
if (isset($_GET['metad'])) $metad = $_GET['metad'];
if (isset($_GET['menu-enable'])) $menuStatus = $_GET['menu-enable'];
if (isset($_GET['menu-order'])) $menuOrder = $_GET['menu-order'];
if (isset($_GET['private'])) $private = $_GET['private'];
if (isset($_GET['title'])) $title = $_GET['title'];
if (isset($_GET['menu'])) $menu = $_GET['menu'];
if (isset($_GET['newid'])) $url = $_GET['newid'];
// --- add end
$buttonname = $i18n['BTN_SAVEPAGE'];
}
...
It would be nice to include this in the next release to allow plugins to prepopulate fields to simplify the use of the CMS.