Forum Moderators: coopster

Message Too Old, No Replies

SSI include for header

with dynamic page title

         

mlduclos

6:54 pm on Dec 27, 2005 (gmt 0)

10+ Year Member



Hello

I use static .shtml files in my site with includes for menu, bottom and so on. I want to put all the header in a include but the content should not be static, because the <title> tag change on each article. Theres is a simple way to do that with a few lines of php? I can set a title variable on each page.

Thanks in advance

jatar_k

8:10 pm on Dec 27, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



maybe try some of the ideas in this thread from our library [webmasterworld.com]
A dynamic site in 2 minutes [webmasterworld.com]

mlduclos

10:30 pm on Dec 27, 2005 (gmt 0)

10+ Year Member



Hello, I get some ideas from the thread, specially the .htaccess to parse html as php without having to edit the apache conf. Im not expecting change the file extension of shtml to php right now

However, I found what I was searching in a site. Now my shtml pages have includes for top,menu and botton, with variable title:

<!--#set var="title" value="Variable Title" -->
<!--#include virtual="header.shtml"-->
<!--#include file="menu.shtml"-->
PAGE CONTENTS
<!--#include file="bottom.shtml"-->

The header.shtml have a <!--#echo var="title" --> in the middle and the bottom.shtml have 2 includes: one for a php script for comments and other for a php script which call the stats program

Thanks