Jump to content

Whmcs New Custom Pages


ShaneP

Recommended Posts

i'm not sure that it could be described as excellent, but the official docs will guide you through the basics...

https://developers.whmcs.com/advanced/creating-pages/

plus as a walkthrough, the following page might help too...

https://www.inmotionhosting.com/support/edu/whmcs/how-to-create-a-custom-page-for-whmcs

for specific help with the template styling, you may want to contact @zomex as it's his template that you're using.

Link to comment
Share on other sites

On 1/3/2019 at 2:24 PM, brian! said:

i'm not sure that it could be described as excellent, but the official docs will guide you through the basics...

https://developers.whmcs.com/advanced/creating-pages/

plus as a walkthrough, the following page might help too...

https://www.inmotionhosting.com/support/edu/whmcs/how-to-create-a-custom-page-for-whmcs

for specific help with the template styling, you may want to contact @zomex as it's his template that you're using.

Thanks Brian.

I also have a guide for creating custom pages below:

Also your template has a selection of HTML code you can use within your custom pages to easily replicate elements (such as the tables, feature boxes etc) from the template. You will find them inside WHMCS admin > addons > Wizard Panel > HTML snippets.

https://www.zomex.com/docs/whmcs-templates/how-to-create-custom-whmcs-pages.php

html-snippets-feature.jpg

Link to comment
Share on other sites

Hi,

 

I know about creating custom pages as above which are essentially client pages.

 

However is it possible to create a customer page that doesn't have the breadcrumb and page title within the page. I tried to edit the php file to comment out these lines bit it doesn't. Essentially I want the header and footer and nothing else apart from my code in between.

 

Any ideas.

 

Thanks

 

Colin

Link to comment
Share on other sites

Hello Colin,

The reason why this happens is your pagetitle and breadcrumb is called in the header.tpl file.

So you can either remove the page title and breadcrumb using CSS or by wrapping the page title/breadcrumb markup in header.tpl e.g:

{if $filename neq "examplepage" or $filename neq "examplepage1"}<h1>{$pagetitle}</h1>{/if}

Thanks,

Jack

Link to comment
Share on other sites

Hi Colin,

On 11/01/2019 at 22:48, TAGAWEB said:

However is it possible to create a customer page that doesn't have the breadcrumb and page title within the page. I tried to edit the php file to comment out these lines bit it doesn't. Essentially I want the header and footer and nothing else apart from my code in between.

I would have thought that you could trim a custom page php file down to its absolute bare bones to remove pagetitle and breadcrumbs...

<?php
use WHMCS\ClientArea;
define('CLIENTAREA', true);
require __DIR__ . '/init.php';
$ca = new ClientArea();
$ca->initPage();
$ca->setTemplate('brian');
$ca->output();

additionally, you may have to edit the /include/pageheader.tpl template and wrap the content to check if the page contains a pagetitle...

{if $pagetitle}
<div class="header-lined">
    <h1>{$title}{if $desc} <small>{$desc}</small>{/if}</h1>
    {if $showbreadcrumb}{include file="$template/includes/breadcrumb.tpl"}{/if}
</div>
{/if}

kvN8zav.png

as you can see, the above is using the default "Six" template and doesn't show any breadcrumbs... I assume this can be adapted to work with your current template, but Jack would know better than me on that.

Link to comment
Share on other sites

@brian!

Your method is much better and certainly the way to go.

I would only recommend using my example method of editing the header.tpl (or pageheader.tpl depending on your template) if you want to keep the markup consistant for all custom pages.

I don't recommend using CSS unless it's a last resort as while hiding elements with CSS is easy it can have potential SEO impacts.

Edited by zomex
Link to comment
Share on other sites

  • 1 year later...

hey guys, how to create a new page for privacy terms, owner side and terms of use?

 

it should have normaly design of page and i want put the all informations.

note it will be 3 different sites.

but i just found here examples not working for this issue.

It should use all standard setting of site.

header, footer and design from standard template style.

it should be easy normaly, but in whmcs nothing is easy

 

 

 

 

Link to comment
Share on other sites

1 hour ago, CL IT Service said:

hey guys, how to create a new page for privacy terms, owner side and terms of use?

did you try following the Creating pages docs ?

you just need to create a .php file in the root of WHMCS and a .tpl template file in your active template folder - then it's just a case of editing the template file with your content (for which you'll need to know HTML and/or Smarty).

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

mNocH2g.png

and if you're using Flowhost, they have their own documentation about adding pages (though it's basically what i've just used above).

https://www.whmcsthemes.com/documentation/whmcs-templates/flow-host/

Link to comment
Share on other sites

Hi, thanks for your reply,

the tpl file "impressum.tpl i created.

 

but i dont understand where i should put the code you added here.

 

what need to be insite of the impressum.php in main folder?

 

yes i use flowhost, but creating site and register is given from main system.

 

my problem is just, that the docs not specific good information what need to do.

 

on whmcs site this doc not more shown, i was searching on google also and no good resultats.

but i will check your doc too

 

 

 

 

 

 

Link to comment
Share on other sites

19 hours ago, CL IT Service said:

but i don't understand where i should put the code you added here.

what need to be insite of the impressum.php in main folder? 

  • impressum.php would contain the PHP code above (that's the file that creates the page) and goes in your WHMCS directory (the same folder that contains configuration.php etc)
  • impressum.tpl is the content of the page and that goes in your active template folder (e.g /templates/six).
19 hours ago, CL IT Service said:

my problem is just, that the docs not specific good information what need to do. 

on whmcs site this doc not more shown, i was searching on google also and no good resultats.

for every custom page, you just need to create a .php file and a.tpl file - the ,tpl  file contains the content of your page and you'll probably need to know HTML to create the content.

in the case of a privacy policy, there would be many online generators that would generate the html content for you - and you can use that as a starting point for your needs.

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