BizNetUK Posted April 19, 2019 Share Posted April 19, 2019 Hi All I am having an issue with some custom client area code im trying to implement in a provisioning module. I have created a template file in the module, called overview.tpl which I call in the ClientArea function within the module as follows return array( 'templatefile' => 'templates/overview', This however only displays that below the usual output in the product details page. I would like to know how to get this to replace the output generated by the clientareaproductdetails.tpl file form the main site template? I have looked at some example modules which seem to use 'tabOverviewReplacementTemplate' and other similar but dont seem to work. Any pointers would be most welcome! 0 Quote Link to comment Share on other sites More sharing options...
BizNetUK Posted May 1, 2019 Author Share Posted May 1, 2019 Anyone got any help on this? 0 Quote Link to comment Share on other sites More sharing options...
NadalKumar Posted May 2, 2019 Share Posted May 2, 2019 Are you loading the template file via a php document? If yes, you'll need to use the smarty global variable $smarty along with the ->assign method eg: $smarty->assign(['templatefile' => 'overview']) or if within the tpl file, {assign var="templatefile" value="overview"} See https://www.smarty.net/docs/en/language.function.assign.tpl 0 Quote Link to comment Share on other sites More sharing options...
steven99 Posted May 2, 2019 Share Posted May 2, 2019 Within the server module's _clientarea() function, you should be returning an array like: return array( 'tabOverviewReplacementTemplate' => "templates/clientarea", 'vars' => array('var1'=>$var1) ); I use this without a problem. It replaces all the default service information. Also, templates folder is a folder relative to your server module. If that does not work for you, provide detail on the behavior. 0 Quote Link to comment Share on other sites More sharing options...
BizNetUK Posted May 2, 2019 Author Share Posted May 2, 2019 Hi steven99 Thanks for your response. I have tried again, and it seems to be an issue with our custom main templates. If I change back to six as the system template it seems to behave as it should. I have had a look at the code on clientareaproductdetails.tpl on both and cant see anywhere that does the override. Is this the correct file? 0 Quote Link to comment Share on other sites More sharing options...
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.