Help - Search - Members - Calendar
Full Version: Adding SSI commands to comment template
Movable Type Community Forum > Additional Resources > Tips and Tricks
(\/)ystic
MT is quiet configurable. However, there is one portion where MT's theme configurability seems to choke, the comments. What is different in comments pages is that all other pages are served as static pages. However the comments pages (add, preview, browse) are all dynamically generated by pl scripts.


Hence, any SSI command included in the template of the comment pages, will be not be rendered. Any one has faced this problem before? Any solutions?

http://www.srijith.net/trinetre/
bmk
Yeah, you're right... you won't be able to use ssi/php in the dynamic templates.  One thing you can do is use an individual template as your comment listing template, then you could for that one, at least.  :)
staggernation
Try using the MTInclude tag in your Comment Listing and/or Comment Preview template. See

http://www.movabletype.org/docs/mtmanual_t...#item_MTInclude

So instead of
CODE
<!--#include virtual="/mysite/ssi/header.txt"-->

you would use

CODE
<$MTInclude file="/www/mysite/ssi/header.txt"$>

(You might have to tweak the path depending on how your site is configured.)

As the documentation says, MTInclude inserts the specified file when the template is rebuilt—but since the comments listing is rebuilt dynamically every time you view it, in this case it does have the same effect as an SSI.
(\/)ystic
Thanks! That works just fine.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.