Jump to content

Custom page error


Recommended Posts

6 hours ago, adv1453 said:

I want to create a custom page but it gives such an error. How can I solve it?

I can't see anything particular wrong with the context code - though if you don't need to show the announcement sidebars on that page, you don't need to include them in the php

there's nothing to stop you using a .php file that only contains the bare minimum...

<?php
use WHMCS\ClientArea;
define('CLIENTAREA', true);
require __DIR__ . '/init.php';
$ca = new ClientArea();
$ca->setPageTitle('Custom Page');
$ca->addToBreadCrumb('index.php', Lang::trans('globalsystemname'));
$ca->addToBreadCrumb('alan-adi-kayit.php', 'Alan');
$ca->initPage();
$ca->setTemplate('alan-adi-kayit');
$ca->output();

that should work as is, but if you then want to add context menus or additional code, they should work too.

Link to comment
Share on other sites

9 hours ago, brian! said:

I can't see anything particular wrong with the context code - though if you don't need to show the announcement sidebars on that page, you don't need to include them in the php

there's nothing to stop you using a .php file that only contains the bare minimum...


<?php
use WHMCS\ClientArea;
define('CLIENTAREA', true);
require __DIR__ . '/init.php';
$ca = new ClientArea();
$ca->setPageTitle('Custom Page');
$ca->addToBreadCrumb('index.php', Lang::trans('globalsystemname'));
$ca->addToBreadCrumb('alan-adi-kayit.php', 'Alan');
$ca->initPage();
$ca->setTemplate('alan-adi-kayit');
$ca->output();

that should work as is, but if you then want to add context menus or additional code, they should work too.

 

Thanks, is solved.

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