Hi Bugs,
This is what I’ve have done.
Create a snippet called "SSI".
Snippet content:
/**
* SSI Snippet
* Param: &fnc - function to be called
*/
$fnc = isset($fnc) ? $fnc:'';
ob_start();
// set SSI path and file name
$ssi = '/home/xxxxxx/public_html/community/SSI.php';
include_once($ssi);
// call SSI function here
if (function_exists($fnc)) @$fnc();
$html = ob_get_contents();
ob_end_clean();
return $html; // return html content
Correct the above to your server path.
Create a document "x".
This is the content of doc "x":
<div id="shouthead">Shoutbox
</div>
<div id="shoutbox" class="feed1">[!SSI? &fnc=`ssi_shout`!]
</div>
This is the content of a second doc, "y":
<div id="onlinehead">Online
</div>
<div id="online" class="feed1">[!SSI? &fnc=`ssi_whosOnline`!]
</div>
Create a TV "block-a".
Input type: (I used "text", but "file" might make more sense).
Default value: @DOCUMENT x
Create another TV, "block-b".
Input type: text.
Default value: @DOCUMENT y
In your template, place "[*block-a*]" and "[*block-b*]" where you’d like TVs to appear. I used TVs so that I don’t have to have the includes appear on all pages where I use the template. "x" and "y" are the IDs of the particular documents you create to contain the SSI calls. You do not need the include at the head of your template. The snippet takes care of this for you!