Help with stylesheets/templates
Help with stylesheets/templates
Hi, This is my first time of using CMS and I'm in the process of setting up one of my clients sites with it. The site will be a mixture of CMS pages and normal html pages. I've created a few html pages and require the CMS pages to have the same navigational structure and footer etc.
I've managed to put these into the pages but my problem is that I have a gap between my header and navigational structure which shows through the background colour.
I'm sure it has something to do with a CSS setting or template setting but can't seem to work out where!!!
If someone can help it would be most appreciated.
Here is a link to what the top section should look like http://www.rivapetz.com.au/Home.php and here is the link to how it is looking within the CMS format http://www.rivapetz.com.au/cms/index.php
Thanks in advance.
I've managed to put these into the pages but my problem is that I have a gap between my header and navigational structure which shows through the background colour.
I'm sure it has something to do with a CSS setting or template setting but can't seem to work out where!!!
If someone can help it would be most appreciated.
Here is a link to what the top section should look like http://www.rivapetz.com.au/Home.php and here is the link to how it is looking within the CMS format http://www.rivapetz.com.au/cms/index.php
Thanks in advance.
Re: Help with stylesheets/templates
Don't know if it will helps, but I think you should check your template once again:
...
And CMSms is a xhtml cms - please validate your site.
There are too much
Rivapetz Petcare helping you to care and keep your pet happy
0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i 2) {
if ((img = MM_findObj(args[2])) != null && !img.MM_init) {
img.MM_init = true; img.MM_up = args[3]; img.MM_dn = img.src;
if ((nbArr = document[grpName]) == null) nbArr = document[grpName] = new Array();
nbArr[nbArr.length] = img;
for (i=4; i
A wealth of information and products to help care for your pets

And CMSms is a xhtml cms - please validate your site.
Last edited by cyberman on Tue Feb 28, 2006 6:28 am, edited 1 time in total.
Re: Help with stylesheets/templates
Thanks, I tried deleting the top set of , then saved and uploaded but still no change. I've put them back.
In the browser source code you can see the second set of head code but in the native file that I'm changing it in (index.php) they don't show.
In the browser source code you can see the second set of head code but in the native file that I'm changing it in (index.php) they don't show.
Re: Help with stylesheets/templates
This follows on from the near the bottom of the source code that you pasted.
info('Serving URL:' . $_SERVER['REQUEST_URI']);
$log->debug('Starting index.php');
/**
* Entry point for all non-admin pages
*
* @package CMS
*/
$starttime = microtime();
@ob_start();
clearstatcache();
if (!file_exists(CONFIG_FILE_LOCATION) || filesize(CONFIG_FILE_LOCATION) MaintenanceSite down for maintenance.";
exit;
}
if (!is_writable(TMP_TEMPLATES_C_LOCATION) || !is_writable(TMP_CACHE_LOCATION))
{
echo 'Error';
echo 'The following directories must be writable by the web server:
';
echo 'tmp/cache
';
echo 'tmp/templates_c
';
echo 'Please correct by executing:
chmod 777 tmp/cache
chmod 777 tmp/templates_c
or the equivilent for your platform before continuing.';
echo '';
exit;
}
require_once(dirname(__FILE__)."/include.php"); #Makes gCms object
$params = array_merge($_GET, $_POST);
global $gCms;
$smarty = &$gCms->smarty;
$smarty->params = $params;
$page = '';
$smarty->id = (isset($params['id'])?$params['id']:'');
if (isset($params['id']) && isset($params[$params['id'] . 'returnid']))
{
$page = $params[$params['id'] . 'returnid'];
}
if (isset($config["query_var"]) && $config["query_var"] != "" && isset($_GET[$config["query_var"]]))
{
$page = $_GET[$config["query_var"]];
}
#else if (isset($_SERVER["PATH_INFO"]) && (isset($_SERVER["SCRIPT_URL"]) && ($_SERVER["PATH_INFO"] != $_SERVER["SCRIPT_URL"])))
#{
# $page = $_SERVER["PATH_INFO"];
#}
#else if (isset($_SERVER["QUERY_STRING"]) && strpos($_SERVER["QUERY_STRING"], 'deleteinstall') === false)
#{
# $page = $_SERVER["QUERY_STRING"];
#}
if ($page == '')
{
$page = ContentManager::GetDefaultContent();
}
else
{
$page = preg_replace('/\variables['pageinfo'] =& $pageinfo;
$gCms->variables['content_id'] = $pageinfo->content_id;
$gCms->variables['page'] = $page;
$gCms->variables['page_id'] = $page;
$gCms->variables['page_name'] = $pageinfo->content_alias;
$gCms->variables['position'] = $pageinfo->content_hierarchy;
}
$html = "";
if (isset($_GET["print"]))
{
($smarty->is_cached('print:'.$page, '', $pageinfo->template_id)?$cached="":$cached="not ");
$log->debug('Fetching: print:' . $pageinfo->template_id);
$html = $smarty->fetch('print:'.$page, '', $pageinfo->template_id) . "\n";
}
else
{
($smarty->is_cached('template:'.$pageinfo->template_id)?$cached="":$cached="not ");
#If this is a case where a module doesn't want a template to be shown, just disable caching
if (isset($_GET['id']) && isset($_GET[$_GET['id'].'showtemplate']) && $_GET[$_GET['id'].'showtemplate'] == 'false')
{
$log->debug('Fetching: template:notemplate');
$html = $smarty->fetch('template:notemplate') . "\n";
}
else
{
$log->debug('Fetching: template:' . $pageinfo->template_id);
$html = $smarty->fetch('template:'.$pageinfo->template_id) . "\n";
}
}
if (get_site_preference('enablecustom404') == "0" && (!$config['debug']))
{
set_error_handler($old_error_handler);
}
if (!$cached)
{
#Perform the content postrendernoncached callback
foreach($gCms->modules as $key=>$value)
{
if ($gCms->modules[$key]['installed'] == true &&
$gCms->modules[$key]['active'] == true)
{
$gCms->modules[$key]['object']->ContentPostRenderNonCached($html);
}
}
}
#Perform the content postrender callback
foreach($gCms->modules as $key=>$value)
{
if ($gCms->modules[$key]['installed'] == true &&
$gCms->modules[$key]['active'] == true)
{
$gCms->modules[$key]['object']->ContentPostRender($html);
}
}
header("Content-Type: " . $gCms->variables['content-type'] . "; charset=" . (isset($pageinfo->template_encoding) && $pageinfo->template_encoding != ''?$pageinfo->template_encoding:get_encoding()));
echo $html;
@ob_flush();
$endtime = microtime();
if ($config["debug"] == true)
{
echo "Generated in ".microtime_diff($starttime,$endtime)." seconds by CMS Made Simple $CMS_VERSION (".$cached."cached) using $sql_execs SQL queries and ".(function_exists('memory_get_usage')?memory_get_usage():'n/a')." bytes of memory";
}
echo "\n";
#echo "Generated in ".microtime_diff($starttime,$endtime)." seconds by CMS Made Simple $CMS_VERSION (".$cached."cached) using $sql_execs SQL queries and ".(function_exists('memory_get_usage')?memory_get_usage():'n/a')." bytes of memory";
echo "\n";
if (get_site_preference('enablesitedownmessage') == "1")
{
$smarty->clear_compiled_tpl();
$smarty->clear_all_cache();
}
$log->debug('Leaving index.php');
if ($config["debug"] == true)
{
echo $sql_queries;
foreach ($gCms->errors as $error)
{
echo $error;
}
}
# vim:ts=4 sw=4 noet
?>
RIVAPETZ PET CARE
Dr Jenni Trewren
8 Gilbert Street, Berri SA 5343
Ph: 08 8582 1344
Email: info@rivapetz.com.au
Website design by That's Graphic
info('Serving URL:' . $_SERVER['REQUEST_URI']);
$log->debug('Starting index.php');
/**
* Entry point for all non-admin pages
*
* @package CMS
*/
$starttime = microtime();
@ob_start();
clearstatcache();
if (!file_exists(CONFIG_FILE_LOCATION) || filesize(CONFIG_FILE_LOCATION) MaintenanceSite down for maintenance.";
exit;
}
if (!is_writable(TMP_TEMPLATES_C_LOCATION) || !is_writable(TMP_CACHE_LOCATION))
{
echo 'Error';
echo 'The following directories must be writable by the web server:
';
echo 'tmp/cache
';
echo 'tmp/templates_c
';
echo 'Please correct by executing:
chmod 777 tmp/cache
chmod 777 tmp/templates_c
or the equivilent for your platform before continuing.';
echo '';
exit;
}
require_once(dirname(__FILE__)."/include.php"); #Makes gCms object
$params = array_merge($_GET, $_POST);
global $gCms;
$smarty = &$gCms->smarty;
$smarty->params = $params;
$page = '';
$smarty->id = (isset($params['id'])?$params['id']:'');
if (isset($params['id']) && isset($params[$params['id'] . 'returnid']))
{
$page = $params[$params['id'] . 'returnid'];
}
if (isset($config["query_var"]) && $config["query_var"] != "" && isset($_GET[$config["query_var"]]))
{
$page = $_GET[$config["query_var"]];
}
#else if (isset($_SERVER["PATH_INFO"]) && (isset($_SERVER["SCRIPT_URL"]) && ($_SERVER["PATH_INFO"] != $_SERVER["SCRIPT_URL"])))
#{
# $page = $_SERVER["PATH_INFO"];
#}
#else if (isset($_SERVER["QUERY_STRING"]) && strpos($_SERVER["QUERY_STRING"], 'deleteinstall') === false)
#{
# $page = $_SERVER["QUERY_STRING"];
#}
if ($page == '')
{
$page = ContentManager::GetDefaultContent();
}
else
{
$page = preg_replace('/\variables['pageinfo'] =& $pageinfo;
$gCms->variables['content_id'] = $pageinfo->content_id;
$gCms->variables['page'] = $page;
$gCms->variables['page_id'] = $page;
$gCms->variables['page_name'] = $pageinfo->content_alias;
$gCms->variables['position'] = $pageinfo->content_hierarchy;
}
$html = "";
if (isset($_GET["print"]))
{
($smarty->is_cached('print:'.$page, '', $pageinfo->template_id)?$cached="":$cached="not ");
$log->debug('Fetching: print:' . $pageinfo->template_id);
$html = $smarty->fetch('print:'.$page, '', $pageinfo->template_id) . "\n";
}
else
{
($smarty->is_cached('template:'.$pageinfo->template_id)?$cached="":$cached="not ");
#If this is a case where a module doesn't want a template to be shown, just disable caching
if (isset($_GET['id']) && isset($_GET[$_GET['id'].'showtemplate']) && $_GET[$_GET['id'].'showtemplate'] == 'false')
{
$log->debug('Fetching: template:notemplate');
$html = $smarty->fetch('template:notemplate') . "\n";
}
else
{
$log->debug('Fetching: template:' . $pageinfo->template_id);
$html = $smarty->fetch('template:'.$pageinfo->template_id) . "\n";
}
}
if (get_site_preference('enablecustom404') == "0" && (!$config['debug']))
{
set_error_handler($old_error_handler);
}
if (!$cached)
{
#Perform the content postrendernoncached callback
foreach($gCms->modules as $key=>$value)
{
if ($gCms->modules[$key]['installed'] == true &&
$gCms->modules[$key]['active'] == true)
{
$gCms->modules[$key]['object']->ContentPostRenderNonCached($html);
}
}
}
#Perform the content postrender callback
foreach($gCms->modules as $key=>$value)
{
if ($gCms->modules[$key]['installed'] == true &&
$gCms->modules[$key]['active'] == true)
{
$gCms->modules[$key]['object']->ContentPostRender($html);
}
}
header("Content-Type: " . $gCms->variables['content-type'] . "; charset=" . (isset($pageinfo->template_encoding) && $pageinfo->template_encoding != ''?$pageinfo->template_encoding:get_encoding()));
echo $html;
@ob_flush();
$endtime = microtime();
if ($config["debug"] == true)
{
echo "Generated in ".microtime_diff($starttime,$endtime)." seconds by CMS Made Simple $CMS_VERSION (".$cached."cached) using $sql_execs SQL queries and ".(function_exists('memory_get_usage')?memory_get_usage():'n/a')." bytes of memory";
}
echo "\n";
#echo "Generated in ".microtime_diff($starttime,$endtime)." seconds by CMS Made Simple $CMS_VERSION (".$cached."cached) using $sql_execs SQL queries and ".(function_exists('memory_get_usage')?memory_get_usage():'n/a')." bytes of memory";
echo "\n";
if (get_site_preference('enablesitedownmessage') == "1")
{
$smarty->clear_compiled_tpl();
$smarty->clear_all_cache();
}
$log->debug('Leaving index.php');
if ($config["debug"] == true)
{
echo $sql_queries;
foreach ($gCms->errors as $error)
{
echo $error;
}
}
# vim:ts=4 sw=4 noet
?>
RIVAPETZ PET CARE
Dr Jenni Trewren
8 Gilbert Street, Berri SA 5343
Ph: 08 8582 1344
Email: info@rivapetz.com.au
Website design by That's Graphic
Re: Help with stylesheets/templates
The dreamweaver part should be included in template, not in index.phpAnnette wrote: ?>
RIVAPETZ PET CARE
Dr Jenni Trewren
8 Gilbert Street, Berri SA 5343
Ph: 08 8582 1344
Email: info@rivapetz.com.au
Website design by That's Graphic

Re: Help with stylesheets/templates
Oohh!! Thanks cyberman.
Sorry, but I'm only just starting to understand CSS and am getting confused with the Templates etc.
I have deleted my code from the index and tried placing it in a few of the different templates but with no success.
Which template file should it go into? The ones in the admin section or within the folder 'tmp' and 'templates' folders in the directory?
I appreciate your help, hopefully I'll get this sorted!!
Sorry, but I'm only just starting to understand CSS and am getting confused with the Templates etc.
I have deleted my code from the index and tried placing it in a few of the different templates but with no success.
Which template file should it go into? The ones in the admin section or within the folder 'tmp' and 'templates' folders in the directory?
I appreciate your help, hopefully I'll get this sorted!!
Re: Help with stylesheets/templates
In CMSms templates are stored in database.
So you must go in admin area to second menu layout - templates. Don't know your installation but your source must be included in the main template (look at the green tick).
So you must go in admin area to second menu layout - templates. Don't know your installation but your source must be included in the main template (look at the green tick).
Re: Help with stylesheets/templates
Back again!! I have re-installed the program as I had deleted a few tags etc initially when I put my navigation structure into the index file.
Still having trouble with getting my navigation menu files to show. I'm using the Bulletmenu Vert col 1 template and have gone into the edit mode and tried pasting the source code in as you suggested. When I submit it and then view the site it just shows up as a blank screen.
I have uploaded the navigation menu files into the uploads/images folder. If they were just plain jpg or gif files I can see in the stylesheet where that gets placed but they're not.
Any suggestions?
Still having trouble with getting my navigation menu files to show. I'm using the Bulletmenu Vert col 1 template and have gone into the edit mode and tried pasting the source code in as you suggested. When I submit it and then view the site it just shows up as a blank screen.
I have uploaded the navigation menu files into the uploads/images folder. If they were just plain jpg or gif files I can see in the stylesheet where that gets placed but they're not.
Any suggestions?
Re: Help with stylesheets/templates
I found the answer in the 'General Help' forum.
The html and javascript needs to be surrounded by {literal} {/literal} tags.
This worked a treat, except I still have the original spacing problem.
To read more about the literal tags go to 'General help" and 'embedding javascript'
The html and javascript needs to be surrounded by {literal} {/literal} tags.
This worked a treat, except I still have the original spacing problem.
To read more about the literal tags go to 'General help" and 'embedding javascript'