Jump to content
  • 0

Client Area Output not working


Jamesking56

Question

Hello,

I'm creating an addon module which needs to add a page to the client area. I only need one page, so I decided to use Client Area Output. Unfortunately though, it isn't working. When clicking on my added navigation link, it instead shows the client home page.

Here's my client area output function:

function gocardless_clientarea($vars) {

    return [
        'pagetitle' => 'Direct Debit',
        'breadcrumb' => ['index.php?m=gocardless' => 'Direct Debit'],
        'templatefile' => 'clienthome',
        'requirelogin' => true,
        'forcessl' => false,
        'vars' => $vars
    ];
}

and here is clienthome.tpl which I put in my module directory:

Hello World

Any ideas why its rendering the client home instead at http://whmcs/clientarea.php?m=gocardless

Cheers.

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

Here is the problem:

32 minutes ago, Jamesking56 said:

Any ideas why its rendering the client home instead at http://whmcs/clientarea.php?m=gocardless 

The right URL is not clientarea.php?m=gocardless but index.php?m=gocardless. You were simply pointing to the wrong file. index.php is where the magic happens.

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
Answer this question...

×   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