Jump to content

php include in a tpl file question


glow

Recommended Posts

Ok let me further explain, currently my index file calls a .ptl file at opening like this:

 

define( "MAINAREA", FALSE );
require( "dbconnect.php" );
require( "includes/functions.php" );
require( "includes/clientareafunctions.php" );
$pagetitle = $_LANG['globalsystemname'];
$breadcrumbnav = "<a href=\"index.php\">".$_LANG['globalsystemname']."</a>";
$templatefile = "content";
$pageicon = "";
initialiseClientArea( $pagetitle, $pageicon, $breadcrumbnav );
$result = select_query( "tblannouncements", "", array( "published" => "on" ), "date", "DESC", "0,3" );
while ( $data = mysql_fetch_array( $result ) )
{
$id = $data['id'];
$date = $data['date'];
$title = $data['title'];
$announcement = $data['announcement'];
$result2 = select_query( "tblannouncements", "", array( "parentid" => $id, "language" => $_SESSION['Language'] ) );
$data = mysql_fetch_array( $result2 );
if ( $data['title'] )
{
	$title = $data['title'];
}
if ( $data['announcement'] )
{
	$announcement = $data['announcement'];
}
$date = fromMySQLDate( $date );
$announcements[] = array( "id" => $id, "date" => $date, "title" => $title, "urlfriendlytitle" => getModRewriteFriendlyString( $title ), "text" => $announcement );
}
$smartyvalues['announcements'] = $announcements;
$smartyvalues['seofriendlyurls'] = $CONFIG['SEOFriendlyUrls'];
outputMAINtArea( $templatefile );
?>

 

the ("$templatefile = "content";) line does the .tpl file loading which is fine the only problem is thatinstead of that "content" tpl  file i need it to load this php file: /products.php?do=groups&groupid=2. So i figure if somehow I can get this php file to be included within the tpl file I could get it loading through there, unless there is a much direct way.

 

thank you

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.