Difference between revisions of "How to enable server side includes"

From EPrints Documentation
Jump to: navigation, search
Line 15: Line 15:
  
 
Restart apache.
 
Restart apache.
 +
 +
Example include:
 +
 +
<!--#include virtual="/cgi/mydynbit"-->
 +
 +
This enables you to add includes to the content of static pages. If you want to add dynamic content to the template you should do this via a template part in cfg.d/dynamic_template.pl.
  
 
[[Category:Howto]]
 
[[Category:Howto]]

Revision as of 16:02, 17 May 2010

Warning This feature requires EPrints version 3.2.1 or later

Note: you must have the Apache Server Side Includes (SSI) module installed and enabled.

Edit archives/[repoid]/cfg/apache.conf and add to the <Location> section AddOutputFilter and +Includes:

 <Location "/eprints">
   PerlSetVar EPrints_ArchiveID myrepo
   
   AddOutputFilter INCLUDES .html
   
   Options +ExecCGI +Includes
   Order allow,deny 
   Allow from all
 </Location>

Restart apache.

Example include:


This enables you to add includes to the content of static pages. If you want to add dynamic content to the template you should do this via a template part in cfg.d/dynamic_template.pl.