Jump to content

Custom Page Title Help


gazpot0111645

Recommended Posts

Hi Guys, So now what i would like to achieve is to change the title of my custom pages without it affecting the inner title of the page...does that make sense?

 

So for example i have created a page called counter-strike-go.php. Here is what it includes in the .php.

 

<?php

define("CLIENTAREA",true);

require("dbconnect.php");
require("includes/functions.php");
require("includes/clientareafunctions.php");

$pagetitle = 'Counter-Strike: Global Offensive';
$pageicon = "images/support/clientarea.gif";
$breadcrumbnav = '<a href="index.php">'.$_LANG['globalsystemname'].'</a>';
$breadcrumbnav .= ' > <a href="counter-strike-go.php">Counter Strike Global Offensive Game Server</a>'; 

initialiseClientArea($pagetitle,$pageicon,$breadcrumbnav);

if ($_SESSION['uid']) {
 # User is Logged In - put any code you like here
} 

# To assign variables in Smarty use the following syntax.
# This can then be used as {$variablename} in the template

$smartyvalues["variablename"] = $value; 

# Define the template filename to be used without the .tpl extension

$templatefile = "csgo"; 

outputClientArea($templatefile);

?>

 

So when i change the title to something more than just 'Counter-Strike: Global Offensive' it then becomes to much for the title on the page. As shown in the attachment.

 

Untitled-1.jpg

 

Hope this all makes sense for you.

Regards

Gary

Link to comment
Share on other sites

Hi Gary,

 

I think it might be useful to read this documentation page - http://docs.whmcs.com/Creating_Pages

 

I don't think dbconnect.php should be used now, it's been replaced by init.php

 

also, you can define additional template variables, meaning that the text on the black ribbon won't necessarily have to be the same as the page title... that might require a little tweak to your template page though to use the new variable.

 

alternatively, you could modify your template to detect what page is calling it and display an appropriate size black ribbon graphic for the title.... or just resize it wider for every page (the quick way!).

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