You are not logged in.
Pages: 1
Hi Tim,
We at Terra-IT are trying to extend the properties of a page to create a 'static page title'. We created a properties file in the 'custom/admin/modules/pages' folder and we copied the core properties file and added the field we wanted. We also created a new field for the static page title in the database. Now what we want to know is how and where the post variables are looped or added to the database. Because at this moment our static page title field is getting posted into the wrong variable.
Thank you in advance.
Added: screenshot of post.
Terra-IT
Offline
You'll want to extend the admin class methods updatePage and createPage (see https://www.bigtreecms.org/docs/dev-gui … ding-core/ under "Extending Without Overriding"). Generally I'd advise calling the parent method first, then manually update the column for your added fields, something like this:
class CustomAdmin extends BigTreeAdminBase {
function createPage($data) {
$id = parent::createPage($data);
sqlquery("UPDATE bigtree_pages SET custom_flag = '".sqlescape($data["custom_flag"])."' WHERE id = '$id'");
return $id;
}
}
Offline
Pages: 1