jkmorayur Posted November 1, 2013 Report Posted November 1, 2013 I have created a new module bellow my module structure modules -> test -> apis -> test_api.php language -> en_us-> test.php views -> default -> images -> add_row.pdt admin_service_info.pdt client_service_info.pdt manage.pdt edit_row.pdt change_password.pdt text.php and i set link button on manage.pdt as follows $link_buttons = array( array('name' => $this->_("Test.add_module_change_password", true), 'attributes' => array('href' => $this->base_uri . "settings/company/modules/changepassword/" . $module->id))); i have a 404 error occure when i click change password link (button link specified on manage.pdt) and i attached the error image Quote
0 Tyson Posted November 1, 2013 Report Posted November 1, 2013 Why do you need to change a password from the manage module section? Isn't that what the Module::manageAddRow() and Module::manageEditRow() methods are for? Nonetheless, if you wanted to have custom tabs, you would need to use GET parameters, and handle them in your Module::manageModule() method. So: $link_buttons = array( array('name' => $this->_("Test.add_module_change_password", true), 'attributes' => array('href' => $this->base_uri . "settings/company/modules/changepassword/" . $module->id))); may link to: $link_buttons = array( array('name' => $this->_("Test.add_module_change_password", true), 'attributes' => array('href' => $this->base_uri . "settings/company/modules/manage/" . $module->id . "/changepassword/")) ); and then you would update your module: public function manageModule($module, array &$vars) { // Load the view into this object, so helpers can be automatically added to the view if (isset($_GET[1]) && $_GET[1] == "changepassword") { $this->view = new View("change_password", "default"); # # TODO: to whatever else you need to do # } else { $this->view = new View("manage", "default"); } $this->view->base_uri = $this->base_uri; $this->view->setDefaultView("components" . DS . "modules" . DS . "test" . DS); // Load the helpers required for this view Loader::loadHelpers($this, array("Form", "Html", "Widget")); $this->view->set("module", $module); return $this->view->fetch(); } I haven't tested this, but that should be pretty close to getting it to work. Michael 1 Quote
Question
jkmorayur
I have created a new module bellow my module structure
modules ->
test ->
apis ->
test_api.php
language ->
en_us->
test.php
views ->
default ->
images ->
add_row.pdt
admin_service_info.pdt
client_service_info.pdt
manage.pdt
edit_row.pdt
change_password.pdt
text.php
and i set link button on manage.pdt as follows
$link_buttons = array(
array('name' => $this->_("Test.add_module_change_password", true), 'attributes' => array('href' => $this->base_uri . "settings/company/modules/changepassword/" . $module->id))
);
i have a 404 error occure when i click change password link (button link specified on manage.pdt) and i attached the error image
1 answer to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.