Server Side Includes (SSI)

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
grickaby

Server Side Includes (SSI)

Post by grickaby »

(My apologies if this has been answered, just spent 45 minutes trying to find an answer this question...)

Can you use SSI in the template manager or in a content block or anywhere for that matter?

Just to test, I pasted: into the template manager AND built a global content block and entered it into the source mode in FCKeditor. No luck with either try.

IIS 6
PHP 4.4.6
MySQL 5.037
CMS 1.04

Help!

-Greg
User avatar
Nullig
Power Poster
Power Poster
Posts: 2380
Joined: Fri Feb 02, 2007 4:31 pm

Re: Server Side Includes (SSI)

Post by Nullig »

If you have the following in your config.php file:

Code: Select all

#Allow smarty {php} tags?  These could be dangerous if you don't trust your users.
$config['use_smarty_php_tags'] = true;
then you can use:

Code: Select all

{php}
//code you want
{/php}
Nullig
Dee
Power Poster
Power Poster
Posts: 1197
Joined: Sun Mar 19, 2006 8:46 pm

Re: Server Side Includes (SSI)

Post by Dee »

Try

Code: Select all

global $gCms;
include $gCms->config['root_path'] . DIRECTORY_SEPARATOR . 'filename.php';
in a UDT.

Regards,
D
grickaby

Re: Server Side Includes (SSI)

Post by grickaby »

This was most helpful, thank you!

-Greg
joters

Re: Server Side Includes (SSI)

Post by joters »

Dee wrote: Try

Code: Select all

global $gCms;
include $gCms->config['root_path'] . DIRECTORY_SEPARATOR . 'filename.php';
in a UDT.

Regards,
D

Hi,

Insert into my tpl:

Code: Select all

global $gCms;
include $gCms->config['root_path'] . DIRECTORY_SEPARATOR . 'filename.php';
..and print screen code  >:(
Pierre M.

Re: Server Side Includes (SSI)

Post by Pierre M. »

Yes, it was said "in a UDT".
Then, you can use the UDT in your templates.

Pierre M.
Locked

Return to “CMSMS Core”