Skip to content

Instantly share code, notes, and snippets.

@andrekutianski
Created January 14, 2020 16:46
Show Gist options
  • Save andrekutianski/42df717409451218f6175b795f93c402 to your computer and use it in GitHub Desktop.
Save andrekutianski/42df717409451218f6175b795f93c402 to your computer and use it in GitHub Desktop.
<?php
function module_ClientArea(array $params) {
// Get the template file, the $_REQUEST can be set in your default template to change sections
$Template_Area = isset($_REQUEST['template_area']) ? $_REQUEST['template_area'] : '';
// Select the templates files depending on the requested area
if ($Template_Area == 'cool_place') {
$Template_File = 'templates/cool_place.tpl';
} else {
$Template_File = 'templates/overview.tpl';
}
// Return the template file to be used when loading the client area.
return array('tabOverviewReplacementTemplate' => $Template_File);
}
<form method="post" action="clientarea.php?action=productdetails">
<input type="hidden" name="id" value="{$serviceid}" />
<input type="hidden" name="template_area" value="cool_place" />
<button class="btn btn-default">
{$LANG.module.Go_To_Cool_Place_Button}
</button>
</form>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment