Jump to content

Add a sidebar menu to a custom menu


weba

Recommended Posts

Hi,
 

Adding a custom page is not that hard. I have this now the file testing.php in de main WHMCS directory and the testing.tpl file in the templatedirectory and it works.

Except for the menu. Thats not visible, however no errors 😉 

How can I get my (or a) menu visible on the custom page ? Am I forgetting something ?

thx
Michel

<?php

use WHMCS\ClientArea;
use WHMCS\Database\Capsule;

define('CLIENTAREA', true);
require __DIR__ . '/init.php';
$ca = new ClientArea();

$ca->setPageTitle('testing');
$ca->addToBreadCrumb('index.php', Lang::trans('globalsystemname'));
$ca->addToBreadCrumb('test.php', 'testing');

$ca->initPage();
Menu::addContext();
Menu::primarySidebar('supportKnowledgeBase');
$ca->setTemplate('testing');

$ca->output();

 

Link to comment
Share on other sites

3 minutes ago, weba said:

Thx for the thinking but that did not solve it.

I just tried it and it works for me... I changed settemplate to use homepage (to save time), but it works...

Mn5cFeE.png

7 minutes ago, weba said:

Its not that I need todo something in the .tpl is it ?

I assume it exists in your active theme folder ?

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