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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

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.   Restore formatting

  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.

×
×
  • 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.