Difference between revisions of "API:EPrints/Apache/Template"

From EPrints Documentation
Jump to: navigation, search
Line 8: Line 8:
 
'''EPrints::Apache::Template''' - Template Applying Module
 
'''EPrints::Apache::Template''' - Template Applying Module
  
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
 +
 +
 +
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=head_synopsis -->
 +
==SYNOPSIS==
 +
  &lt;?xml version="1.0" standalone="no"?&gt;
 +
  &lt;!DOCTYPE html SYSTEM "entities.dtd"&gt;
 +
  &lt;html xmlns="http://www.w3.org/1999/xhtml" xmlns:epc="http://eprints.org/ep3/control"&gt;
 +
    &lt;head&gt;
 +
      &lt;title&gt;&lt;epc:pin ref="title" textonly="yes"/&gt; - &lt;epc:phrase ref="archive_name"/&gt;&lt;/title&gt;
 +
    ...
 +
 
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 
<span style='display:none'>User Comments</span>
 
<span style='display:none'>User Comments</span>
Line 20: Line 36:
  
 
Templates are parsed at the server start-up which expands any included phrases. The resulting document is split into chunks where a chunk is either a section of XHTML or an &lt;epc:pin&gt;. Pins are replaced with the page content.
 
Templates are parsed at the server start-up which expands any included phrases. The resulting document is split into chunks where a chunk is either a section of XHTML or an &lt;epc:pin&gt;. Pins are replaced with the page content.
 
&lt;source lang="html"&gt; &lt;?xml version="1.0" standalone="no"?&gt; &lt;!DOCTYPE html SYSTEM "entities.dtd"&gt; &lt;html xmlns="http://www.w3.org/1999/xhtml" xmlns:epc="http://eprints.org/ep3/control"&gt;
 
  &lt;head&gt;
 
      &lt;title&gt;&lt;epc:pin ref="title" textonly="yes"/&gt; - &lt;epc:phrase ref="archive_name"/&gt;&lt;/title&gt; &lt;/source&gt;
 
  
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>

Revision as of 16:22, 14 December 2011

EPrints 3 Reference: Directory Structure - Metadata Fields - Repository Configuration - XML Config Files - XML Export Format - EPrints data structure - Core API - Data Objects


API: Core API

Latest Source Code (3.3, 3.2) | Revision Log | Before editing this page please read Pod2Wiki


NAME

EPrints::Apache::Template - Template Applying Module

User Comments


SYNOPSIS

 <?xml version="1.0" standalone="no"?>
 <!DOCTYPE html SYSTEM "entities.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" xmlns:epc="http://eprints.org/ep3/control">
   <head>
     <title><epc:pin ref="title" textonly="yes"/> - <epc:phrase ref="archive_name"/></title>
   ...
 

User Comments


DESCRIPTION

When HTML pages are served by EPrints they are processed through a template file. There are typically two template files, one for HTTP and one for HTTPS (if configured).

Templates are parsed at the server start-up which expands any included phrases. The resulting document is split into chunks where a chunk is either a section of XHTML or an <epc:pin>. Pins are replaced with the page content.

User Comments


Pins

User Comments


title

The title of the page.

User Comments


page

The page content.

User Comments


login_status_header

HTML <head> includes for the login status of the user - currently just some JavaScript variables.

User Comments


head

Page-specific HTML <head> contents.

User Comments


pagetop

(Unused?)

User Comments


login_status

A menu containing EPrints::Plugin::Screens that appear in key_tools. The content from each plugin's render_action_link is rendered as a HTML <ul> list.

Historically this was the login/logout links plus key_tools but since 3.3 login/logout are Screen plugins as well.

User Comments


languages

The render_action_link from EPrints::Plugin::Screen::SetLang.

User Comments


SEE ALSO

EPrints::Repository/template_dirs

User Comments


COPYRIGHT

User Comments