Jump to content
Wiki Home
EPrints Home
Bazaar
Files
Main menu
Main menu
move to sidebar
hide
Navigation
Front Page
EPrints 3 Manual
EPrints Training Course
EPrints Glossary
Installing EPrints
How-to Configure EPrints
EPrints 3.2+ API
EPrints 3 Reference
EPrints Plugins
Wiki
All categories
Recent changes
Main Page
Help
EPrints Documentation
Search
Search
Appearance
Log in
Request account
Personal tools
Log in
Request account
Pages for logged out editors
learn more
Contributions
Talk
Editing
New Features in EPrints 3.1
(section)
Page
Discussion
British English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== XML based Scripting == === Expansion inside epc:phrase === This means you can place a bit of EPScript inside {} in the ref element of a phrase tag and have it expanded before the phrase is selected. Eg. <pre><nowiki> <epc:phrase ref="page:html_description_{somefield.as_string()}" /></nowiki></pre> So if the value of somefield was "foo" this would display the phrase "page:html_description_foo". === <epc:foreach> === This is a new tag for XML files: <epc:foreach> takes a list (eg. the value of a "multiple" field) and returns the contents of the tag once for each value in the list.eg. <pre><nowiki> <ol> <epc:foreach expr="creators_name" iterator="name"> <li>(<epc:print expr="$name" />)</li> </epc:foreach> </ol></nowiki></pre> which would resolve to something like: <pre><nowiki> <ol> <li>(Smith, John)</li> <li>(Jones, Davy)</li> </ol></nowiki></pre> === STRING.strlen()=== This just returns the length of a string. Useful in the issues.xml for identifying very long or short strings. <spc:print expr="title.strlen()" /> would return the number of characters in the title field. === today() === The today() function takes no parameters and returns the current date. === DATE.datemath( CHANGE, TYPE ) === CHANGE is a positive or negative value and type is year, month or day. Returns the resulting date. For example: today().datemath( -6, "month" ) would return a date six months before today. === VALUE.as_string() === This strips any EPrints MetaField type from the value and returns a plain STRING. This is used to suppress the normal render function. So that, for example, a value from a set field will be printeda as the database value, rather than the phrase associated with it.
Summary:
Please note that all contributions to EPrints Documentation may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
EPrints Documentation:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)