Jump to content

Override product details template per module


BizNetUK

Recommended Posts

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!

Link to comment
Share on other sites

  • 2 weeks later...

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated