<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://wiki.ext-9.eprints-hosting.org/w/index.php?action=history&amp;feed=atom&amp;title=API%3Aperl_lib%2FEPrints%2FApache%2FTemplate.pm</id>
	<title>API:perl lib/EPrints/Apache/Template.pm - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.ext-9.eprints-hosting.org/w/index.php?action=history&amp;feed=atom&amp;title=API%3Aperl_lib%2FEPrints%2FApache%2FTemplate.pm"/>
	<link rel="alternate" type="text/html" href="https://wiki.ext-9.eprints-hosting.org/w/index.php?title=API:perl_lib/EPrints/Apache/Template.pm&amp;action=history"/>
	<updated>2026-05-11T09:43:55Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>https://wiki.ext-9.eprints-hosting.org/w/index.php?title=API:perl_lib/EPrints/Apache/Template.pm&amp;diff=10438&amp;oldid=prev</id>
		<title>Tdb01r: Created page with &#039;&lt;!-- Pod2Wiki=_preamble_  This page has been automatically generated from the EPrints 3.2 source. Any wiki changes made between the &#039;Pod2Wiki=*&#039; and &#039;Edit below this comment&#039; com…&#039;</title>
		<link rel="alternate" type="text/html" href="https://wiki.ext-9.eprints-hosting.org/w/index.php?title=API:perl_lib/EPrints/Apache/Template.pm&amp;diff=10438&amp;oldid=prev"/>
		<updated>2012-04-16T15:52:21Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;#039;&amp;lt;!-- Pod2Wiki=_preamble_  This page has been automatically generated from the EPrints 3.2 source. Any wiki changes made between the &amp;#039;Pod2Wiki=*&amp;#039; and &amp;#039;Edit below this comment&amp;#039; com…&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;!-- Pod2Wiki=_preamble_ &lt;br /&gt;
This page has been automatically generated from the EPrints 3.2 source. Any wiki changes made between the &amp;#039;Pod2Wiki=*&amp;#039; and &amp;#039;Edit below this comment&amp;#039; comments will be lost.&lt;br /&gt;
 --&amp;gt;{{API}}{{Pod2Wiki}}{{API:Source|file=perl_lib/EPrints/Apache/Template.pm|package_name=perl_lib/EPrints/Apache/Template.pm}}[[Category:API|PERL_LIB/EPRINTS/APACHE/TEMPLATE.PM]][[Category:API:perl_lib/EPrints/Apache/Template.pm|PERL_LIB/EPRINTS/APACHE/TEMPLATE.PM]][[Category:API:perl_lib/EPrints/Apache/Template.pm|PERL_LIB/EPRINTS/APACHE/TEMPLATE.PM]]&amp;lt;div&amp;gt;&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_private_ --&amp;gt;&amp;lt;!-- Pod2Wiki=head_name --&amp;gt;&lt;br /&gt;
==NAME==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;EPrints::Apache::Template&amp;#039;&amp;#039;&amp;#039; - Template Applying Module&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_synopsis --&amp;gt;&lt;br /&gt;
==SYNOPSIS==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;!DOCTYPE html SYSTEM &amp;quot;entities.dtd&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;html xmlns=&amp;quot;http://www.w3.org/1999/xhtml&amp;quot; xmlns:epc=&amp;quot;http://eprints.org/ep3/control&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;head&amp;gt;&lt;br /&gt;
	  &amp;lt;title&amp;gt;&amp;lt;epc:pin ref=&amp;quot;title&amp;quot; textonly=&amp;quot;yes&amp;quot;/&amp;gt; - &amp;lt;epc:phrase ref=&amp;quot;archive_name&amp;quot;/&amp;gt;&amp;lt;/title&amp;gt;&lt;br /&gt;
  ...&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_description --&amp;gt;&lt;br /&gt;
==DESCRIPTION==&lt;br /&gt;
This module renders HTML page content using a template.&lt;br /&gt;
&lt;br /&gt;
Templates are parsed and rendered at server start-up, expanding phrases and any EPC. If you need to include dynamic content in the page use use a pin generated via {{API:PodLink|file=perl_lib|package_name=perl_lib|section=EPrints|text=perl_lib/EPrints/Apache/Template.pm/Dynamic Pins}}.&lt;br /&gt;
&lt;br /&gt;
The page title, content and other core page structures are supplied via {{API:PodLink|file=perl_lib|package_name=perl_lib|section=EPrints|text=perl_lib/EPrints/Apache/Template.pm/Default Pins}}.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_static_html_pages --&amp;gt;&lt;br /&gt;
===Static HTML Pages===&lt;br /&gt;
Static files with the &amp;#039;&amp;#039;.xpage&amp;#039;&amp;#039; extension are rendered using templates:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;  &amp;amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;  standalone=&amp;quot;no&amp;quot;  ?&amp;amp;gt;&lt;br /&gt;
  &amp;amp;lt;!DOCTYPE page SYSTEM &amp;quot;entities.dtd&amp;quot; &amp;amp;gt;&lt;br /&gt;
  &amp;amp;lt;xpage:page xmlns=&amp;quot;http://www.w3.org/1999/xhtml&amp;quot; xmlns:xpage=&amp;quot;http://eprints.org/ep3/xpage&amp;quot; xmlns:epc=&amp;quot;http://eprints.org/ep3/control&amp;quot;&amp;amp;gt;&lt;br /&gt;
    &amp;amp;lt;xpage:template&amp;amp;gt;default&amp;amp;lt;/xpage:template&amp;amp;gt;&lt;br /&gt;
    &amp;amp;lt;xpage:head&amp;amp;gt;&lt;br /&gt;
      &amp;amp;lt;style type=&amp;quot;text/css&amp;quot;&amp;amp;gt;h1 { text-weight: bold }&amp;amp;lt;/style&amp;amp;gt;&lt;br /&gt;
    &amp;amp;lt;/xpage:head&amp;amp;gt;&lt;br /&gt;
    &amp;amp;lt;xpage:title&amp;amp;gt;My first XPage&amp;amp;lt;/xpage:title&amp;amp;gt;&lt;br /&gt;
    &amp;amp;lt;xpage:body&amp;amp;gt;&lt;br /&gt;
      Writing XPages is easy.&lt;br /&gt;
    &amp;amp;lt;/xpage:body&amp;amp;gt;&lt;br /&gt;
  &amp;amp;lt;/xpage:page&amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;lt;xpage:template&amp;amp;gt;&amp;lt;/code&amp;gt; is a special pin that, instead of supplying content to the template, changes the template used for rendering. The content is just the template name (without the &amp;#039;&amp;#039;.xml&amp;#039;&amp;#039; extension).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_default_pins --&amp;gt;&lt;br /&gt;
===Default Pins===&lt;br /&gt;
* title&lt;br /&gt;
: The title of the page.&lt;br /&gt;
&lt;br /&gt;
* page&lt;br /&gt;
: The page content.&lt;br /&gt;
&lt;br /&gt;
* login_status_header&lt;br /&gt;
: HTML &amp;amp;lt;head&amp;amp;gt; includes for the login status of the user - currently just some JavaScript variables.&lt;br /&gt;
&lt;br /&gt;
* head&lt;br /&gt;
: Page-specific HTML &amp;amp;lt;head&amp;amp;gt; contents.&lt;br /&gt;
&lt;br /&gt;
* pagetop&lt;br /&gt;
: (Unused?)&lt;br /&gt;
&lt;br /&gt;
* login_status&lt;br /&gt;
: A menu containing [[API:EPrints/Plugin/Screen|EPrints::Plugin::Screen]]s that appear in &amp;lt;code&amp;gt;key_tools&amp;lt;/code&amp;gt;. The content from each plugin&amp;#039;s &amp;lt;code&amp;gt;render_action_link&amp;lt;/code&amp;gt; is rendered as a HTML &amp;amp;lt;ul&amp;amp;gt; list.&lt;br /&gt;
&lt;br /&gt;
: Historically this was the login/logout links plus &amp;lt;code&amp;gt;key_tools&amp;lt;/code&amp;gt; but since 3.3 login/logout are Screen plugins as well.&lt;br /&gt;
&lt;br /&gt;
* languages&lt;br /&gt;
: The &amp;lt;code&amp;gt;render_action_link&amp;lt;/code&amp;gt; from [[API:EPrints/Plugin/Screen/SetLang|EPrints::Plugin::Screen::SetLang]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_dynamic_pins --&amp;gt;&lt;br /&gt;
===Dynamic Pins===&lt;br /&gt;
In &amp;lt;code&amp;gt;cfg.d/dynamic_template.pl&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;  $c-&amp;amp;gt;{dynamic_template}-&amp;amp;gt;{function} = sub {&lt;br /&gt;
    my( $repo, $parts ) = @_;&lt;br /&gt;
  &lt;br /&gt;
    $parts-&amp;gt;{mypin} = $repo-&amp;gt;xml-&amp;gt;create_text_node( &amp;quot;Hello, World!&amp;quot; );&lt;br /&gt;
  };&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;archives/[archiveid]/cfg/templates/default.xml&amp;lt;/code&amp;gt; (copy from &amp;lt;code&amp;gt;lib/templates/default.xml&amp;lt;/code&amp;gt; if not already exists):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;  &amp;amp;lt;epc:pin ref=&amp;quot;mypin&amp;quot; /&amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or, for just the text content of a pin:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;  &amp;amp;lt;epc:pin ref=&amp;quot;mypin&amp;quot; textonly=&amp;quot;yes&amp;quot; /&amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_methods --&amp;gt;&lt;br /&gt;
==METHODS==&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_see_also --&amp;gt;&lt;br /&gt;
==SEE ALSO==&lt;br /&gt;
The directories scanned for template sources are in [[API:EPrints/Repository#template_dirs|EPrints::Repository/template_dirs]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_copyright --&amp;gt;&lt;br /&gt;
==COPYRIGHT==&lt;br /&gt;
Copyright 2000-2011 University of Southampton.&lt;br /&gt;
&lt;br /&gt;
This file is part of EPrints http://www.eprints.org/.&lt;br /&gt;
&lt;br /&gt;
EPrints is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.&lt;br /&gt;
&lt;br /&gt;
EPrints is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.&lt;br /&gt;
&lt;br /&gt;
You should have received a copy of the GNU Lesser General Public License along with EPrints.  If not, see http://www.gnu.org/licenses/.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Pod2Wiki= --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_postamble_ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Edit below this comment --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tdb01r</name></author>
	</entry>
</feed>