You are not logged in.
Pages: 1
I am trying to integrate primal into the CMS I use. I have discovered that basically any custom page can be created using the following template
<?php
require_once("class2.php");
require_once(HEADERF);
$caption = "caption text";
$text = "body text";
$aj = new textparse;
$caption = $aj -> tpa($caption, "on");
$text = $aj -> tpa($text, "on","admin");
$ns -> tablerender($caption, $text);
require_once(FOOTERF);
?>
I was wondering how I could wrap that around the print $content; command in index.php and action.php? From there I know it is just a matter of template tweaking, which is the easy bit.
PRIMAL source is here http://hermes.cactuswax.net/scm/viewcvs … mal/trunk/
Offline
OK, I did some tweaking and came up with this:
require_once("../class2.php");
require_once(HEADERF);
$caption = "caption text";
$text = file_get_contents('tpl/index.tpl');
$aj = new textparse;
$caption = $aj -> tpa($caption, "on");
$text = $aj -> tpa($text, "on","admin");
$ns -> tablerender($caption, $text);
require_once(FOOTERF);
i.e. completey ignoring the $content var. It now displays correctly withing the CMS but all of the info that should be read from teh config files suddenly gets f'ed up. I'm sure someone can fix this easily
Offline
Pages: 1