Hi,
I was wondering if there are any web master members who know a way to solve a issue I'm having with a php / ruby run web site.
I am putting a site together that uses a common php include header. This of course then presents a common page title which I need to solve for SOE reasons. The way the header works also includes the navigation and the top of each page with the <body> tag. The other issue is that the header is a rhtml file as the back end runs on ruby, which I can not change or access (aside from the templates). This means it has a low tolerance for including too much php scripting before breaking it.
I have search the web for ways around this and found a few near but not quite there answers. A lot revolve around the naming the <body> with a class, which I can not use.
I'm looking for a way that can pick up another element in the individual page. I have found this method which uses a heading class to work (Although I'd change it to use a <h2 = class"">):
<?php if ($title): ?>
<?php print render($title_prefix); ?>
<h1 class="title" id="page-title"><?php print $title; ?></h1>
<?php print render($title_suffix); ?>
<?php endif; ?>
I can't get this to work though. The anonymous source on a pastebox site was unclear on any detailed usage instruction. I am not sure on what to place in the header and what to place on the page. When placed in the header it just breaks the script as expected. Has anyone else had this sort of problem and found a fix please? Or can make more sense out of this code than me.
Kind regards
kipper
I was wondering if there are any web master members who know a way to solve a issue I'm having with a php / ruby run web site.
I am putting a site together that uses a common php include header. This of course then presents a common page title which I need to solve for SOE reasons. The way the header works also includes the navigation and the top of each page with the <body> tag. The other issue is that the header is a rhtml file as the back end runs on ruby, which I can not change or access (aside from the templates). This means it has a low tolerance for including too much php scripting before breaking it.
I have search the web for ways around this and found a few near but not quite there answers. A lot revolve around the naming the <body> with a class, which I can not use.
I'm looking for a way that can pick up another element in the individual page. I have found this method which uses a heading class to work (Although I'd change it to use a <h2 = class"">):
<?php if ($title): ?>
<?php print render($title_prefix); ?>
<h1 class="title" id="page-title"><?php print $title; ?></h1>
<?php print render($title_suffix); ?>
<?php endif; ?>
I can't get this to work though. The anonymous source on a pastebox site was unclear on any detailed usage instruction. I am not sure on what to place in the header and what to place on the page. When placed in the header it just breaks the script as expected. Has anyone else had this sort of problem and found a fix please? Or can make more sense out of this code than me.
Kind regards
kipper
Comment