Jump to content

creating new page issue


jdmefsir

Recommended Posts

hello, sorry to osund noobish. I have spent the last few hours trying to figure out an issue i am having with creating a new page.

 

I copied my web_hosting php and tpl file and renamed them web_design php and tpl. I if change nothing but the title the page loads.

If i change 

$ca->addToBreadCrumb('index.php', Lang::trans('globalsystemname'));
$ca->addToBreadCrumb('web_hosting.php', 'web hosting');

to 

$ca->addToBreadCrumb('index.php', Lang::trans('globalsystemname'));
$ca->addToBreadCrumb('web_design.php', 'webdesign');

$ca->setPageTitle('Web Hosting');

to 

$ca->setPageTitle('Web Design');

$ca->setTemplate('web_hosting');

to 

$ca->setTemplate('web_design');

 

then the page doesnt load the css and any changes i make do not show up on the site.

 

Am i missing something somewhere else?

 

so to recap, i copied and renamed the working page web_hosting.php and tpl and named them to the new pages i want and they load, as soon as i make any changes they do not load correctly. 

 

I have cleared browser and whmcs cache.

 

Sorry i am still new to whmcs.

Link to comment
Share on other sites

I have attached the files. The web_hosting.php is the page i used to copy and create new pages for design and ssl

 

so, web_hosting.php and .tpl are one i used to clone and create new pages

web_design.php .tpl

ssl_certificates.php .tpl are the new pages made from web_hosting.php and tpl

ssl_certificates.php

ssl_certificates.tpl

web_design.php

web_design.tpl

web_hosting.php

web_hosting.tpl

Link to comment
Share on other sites

21 hours ago, jdmefsir said:

so to recap, i copied and renamed the working page web_hosting.php and tpl and named them to the new pages i want and they load, as soon as i make any changes they do not load correctly. 

I don't see anything particularly wrong with the .php files - they're basically just copies of the example from the creating pages documentation... though for simplicity, and to avoid confusion, i'd be tempted to trim them right down to the bare essentials...

<?php
use WHMCS\ClientArea;
use WHMCS\Database\Capsule;
define('CLIENTAREA', true);
require __DIR__ . '/init.php';
$ca = new ClientArea();
$ca->setPageTitle('web design');
$ca->addToBreadCrumb('index.php', Lang::trans('globalsystemname'));
$ca->addToBreadCrumb('web_design.php', 'web design');
$ca->initPage();
$ca->setTemplate('web_design');
$ca->output();
?>

tVW87j8.png

obviously, i'm looking at this through the "Six" template and by implication of those templates, you must be using a @ThemeMetro template on your site - that being the case, thememetro's support might be a better path for an answer here as i've no idea what css/js settings are in your header and so don't know how this "should" look.

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