<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://wiki.eprints.org/w/index.php?action=history&amp;feed=atom&amp;title=Dynamic_template.pl</id>
	<title>Dynamic template.pl - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.eprints.org/w/index.php?action=history&amp;feed=atom&amp;title=Dynamic_template.pl"/>
	<link rel="alternate" type="text/html" href="https://wiki.eprints.org/w/index.php?title=Dynamic_template.pl&amp;action=history"/>
	<updated>2026-05-05T20:26:09Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.31.8</generator>
	<entry>
		<id>https://wiki.eprints.org/w/index.php?title=Dynamic_template.pl&amp;diff=14326&amp;oldid=prev</id>
		<title>Drn@ecs.soton.ac.uk: Added actually file name in bold. Also discuss template_core as a supersedent.</title>
		<link rel="alternate" type="text/html" href="https://wiki.eprints.org/w/index.php?title=Dynamic_template.pl&amp;diff=14326&amp;oldid=prev"/>
		<updated>2022-01-27T12:23:00Z</updated>

		<summary type="html">&lt;p&gt;Added actually file name in bold. Also discuss template_core as a supersedent.&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en-GB&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 12:23, 27 January 2022&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l2&quot; &gt;Line 2:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 2:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{cfgd}}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{cfgd}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This file contains the enabling (i.e. &amp;lt;code&amp;gt;$c-&amp;gt;{dynamic_template}-&amp;gt;{enable} = 1;&amp;lt;/code&amp;gt;) and the option to define a function for the dynamic template.&amp;#160; This allow parts of the template (i.e. pins) to be defined on-the-fly.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;'''dynamic_template.pl''' is superseded by [[template_core.pl]] but is linked into this through [[template_legacy.pl]], so can still be used if so wanted.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This file contains the enabling (i.e. &amp;lt;code&amp;gt;$c-&amp;gt;{dynamic_template}-&amp;gt;{enable} = 1;&amp;lt;/code&amp;gt;) and the option to define a function for the dynamic template.&amp;#160; This allow parts of the template (i.e. pins) to be defined on-the-fly. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt; &lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; $c-&amp;gt;{dynamic_template}-&amp;gt;{function} = sub {&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; $c-&amp;gt;{dynamic_template}-&amp;gt;{function} = sub {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160;  my( $repository, $parts ) = @_;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160;  my( $repository, $parts ) = @_;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Drn@ecs.soton.ac.uk</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.eprints.org/w/index.php?title=Dynamic_template.pl&amp;diff=14271&amp;oldid=prev</id>
		<title>Drn@ecs.soton.ac.uk: Added page about config file</title>
		<link rel="alternate" type="text/html" href="https://wiki.eprints.org/w/index.php?title=Dynamic_template.pl&amp;diff=14271&amp;oldid=prev"/>
		<updated>2022-01-22T22:08:58Z</updated>

		<summary type="html">&lt;p&gt;Added page about config file&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{dirs}}&lt;br /&gt;
{{cfgd}}&lt;br /&gt;
&lt;br /&gt;
This file contains the enabling (i.e. &amp;lt;code&amp;gt;$c-&amp;gt;{dynamic_template}-&amp;gt;{enable} = 1;&amp;lt;/code&amp;gt;) and the option to define a function for the dynamic template.  This allow parts of the template (i.e. pins) to be defined on-the-fly.&lt;br /&gt;
 $c-&amp;gt;{dynamic_template}-&amp;gt;{function} = sub {&lt;br /&gt;
   my( $repository, $parts ) = @_;&lt;br /&gt;
   $parts-&amp;gt;{mypin} = $repository-&amp;gt;xml-&amp;gt;create_text_node( &amp;quot;Hello, World!&amp;quot; );&lt;br /&gt;
 };&lt;br /&gt;
The above example sets the pin ''mypin'' to the text string ''Hello, World!''.  This can then be included in the archive's template (e.g. ''cfg/lane/en/templates/default.xml'') with the markup:&lt;br /&gt;
 &amp;amp;lt;epc:pin ref=&amp;quot;mypin&amp;quot;/&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
As well as the dynamic template function there is configuration to define the order that the main options in EPrints' ''key_tools'':&lt;br /&gt;
 $c-&amp;gt;{plugins}-&amp;gt;{&amp;quot;Screen::Login&amp;quot;}-&amp;gt;{appears}-&amp;gt;{key_tools} = 100;&lt;br /&gt;
 $c-&amp;gt;{plugins}-&amp;gt;{&amp;quot;Screen::Register&amp;quot;}-&amp;gt;{actions}-&amp;gt;{register}-&amp;gt;{appears}-&amp;gt;{key_tools} = 150;&lt;br /&gt;
 $c-&amp;gt;{plugins}-&amp;gt;{&amp;quot;Screen::Logout&amp;quot;}-&amp;gt;{appears}-&amp;gt;{key_tools} = 10000;&lt;br /&gt;
 $c-&amp;gt;{plugins}-&amp;gt;{&amp;quot;Screen::Admin::Config::Edit::XPage&amp;quot;}-&amp;gt;{actions}-&amp;gt;{edit}-&amp;gt;{appears}-&amp;gt;{key_tools} = 1250;&lt;br /&gt;
 $c-&amp;gt;{plugins}-&amp;gt;{&amp;quot;Screen::Admin::Phrases&amp;quot;}-&amp;gt;{actions}-&amp;gt;{edit}-&amp;gt;{appears}-&amp;gt;{key_tools} = 1350;&lt;br /&gt;
 $c-&amp;gt;{plugins}-&amp;gt;{&amp;quot;Screen::OtherTools&amp;quot;}-&amp;gt;{appears}-&amp;gt;{key_tools} = 20000;&lt;/div&gt;</summary>
		<author><name>Drn@ecs.soton.ac.uk</name></author>
		
	</entry>
</feed>