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
API:EPrints/XHTML
(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!
==METHODS== <!-- Pod2Wiki=head_form --> ===form=== <source lang="perl">$node = $xhtml->form( $method [, $action] ) </source> Returns an XHTML form. If $action isn't defined uses the current URL. <!-- Edit below this comment --> <!-- Pod2Wiki= --> <!-- Pod2Wiki=head_input_field --> ===input_field=== <source lang="perl">$node = $xhtml->input_field( $name, $value, %opts ) </source> <pre> $node = $xhtml->input_field( "name", "Bob", type => "text" );</pre> Returns an XHTML input field with name $name and value $value. Specify "noenter" to prevent the form being submitted when the user presses the enter key. <!-- Edit below this comment --> <!-- Pod2Wiki= --> <!-- Pod2Wiki=head_hidden_field --> ===hidden_field=== <source lang="perl">$node = $xhtml->hidden_field( $name, $value, %opts ); </source> Returns an XHTML hidden input field. <!-- Edit below this comment --> <!-- Pod2Wiki= --> <!-- Pod2Wiki=head_action_button --> ===action_button=== <source lang="perl">$node = $xhtml->action_button( $name, $value, %opts ) </source> Creates a submit button that is styled to an EPrints form button. $value is the text shown on the button. <!-- Edit below this comment --> <!-- Pod2Wiki= --> <!-- Pod2Wiki=head_action_icon --> ===action_icon=== <source lang="perl">$node = $xhtml->action_icon( $name, $src, %opts ) </source> Creates an image button that links to $src. For usability it is strongly recommended to supply the alt= attribute. <!-- Edit below this comment --> <!-- Pod2Wiki= --> <!-- Pod2Wiki=head_text_area_field --> ===text_area_field=== <source lang="perl">$node = $xhtml->text_area_field( $name, $value, %opts ) </source> Returns an XHTML textarea input. <!-- Edit below this comment --> <!-- Pod2Wiki= --> <!-- Pod2Wiki=head_data_element --> ===data_element=== <source lang="perl">$node = $xhtml->data_element( $name, $value, %opts ) </source> Create a new element named $name containing a text node containing $value. Options: indent - amount of whitespace to indent by <!-- Edit below this comment --> <!-- Pod2Wiki= --> <!-- Pod2Wiki=head_to_xhtml --> ===to_xhtml=== <source lang="perl">$utf8_string = $xhtml->to_xhtml( $node, %opts ) </source> Returns $node as valid XHTML. <!-- Edit below this comment --> <!-- Pod2Wiki= --> <!-- Pod2Wiki=head_to_text_dump --> ===to_text_dump=== <source lang="perl">$string = $xhtml->to_text_dump( $tree, %opts ) </source> Dumps the XHTML contents of $tree as a utf8 string, stripping tags and converting common HTML layout elements into their plain-text equivalent. Options: <pre> width - word-wrap after the given number of columns show_links - see below preformatted - equivalent to wrapping $tree in <pre></pre></pre> XHTML elements are removed with the following exceptions: <br /> is replaced by a newline. <p>...</p> will have a blank line above and below. <img /> is replaced with the content of the <em>alt</em> attribute. <hr /> will insert a line of dashes if '''width''' is set. <a href="foo">bar</a> will be replaced by "bar <foo>" if '''show_links''' is set. <!-- Edit below this comment --> <!-- Pod2Wiki= --> <!-- Pod2Wiki=head_box --> ===box=== <source lang="perl">$node = $xhtml->box( $content, %opts ) </source> Render a collapsible box. Options: * basename = ep_box : Prefix to use for identifying page elements. * collapsed = 1 : Should the box start rolled up. * show_label : Label shown when the box is hidden (in the link). * hide_label : Label shown when the box is visible (in the link). * show_icon_url = "style/images/plus.png" : The url of the icon to use instead of the [+]. * hide_icon_url = "style/images/minus.png" : The url of the icon to use instead of the [-]. <!-- Edit below this comment --> <!-- Pod2Wiki= --> <!-- Pod2Wiki=head_tabs --> ===tabs=== <source lang="perl">$node = $xhtml->tabs( $labels, $contents, %opts ) </source> Render a tabbed box where: <pre> labels - an array of label XHTML fragments contents - an array of content XHTML fragments</pre> Options: <pre> base_url - the link to follow under non-JS (default = current URL) basename - prefix for tab identifiers (default = "ep_tabs") current - index of tab to show first (default = 0) expensive - array of tabs to not javascript-link aliases - map tab index to alias name</pre> <!-- Edit below this comment --> <!-- Pod2Wiki= --> <!-- Pod2Wiki=head_tree --> ===tree=== <source lang="perl">$node = $xhtml->tree( $root, OPTIONS ) </source> Render a tree using definition lists (DLs). Options: <pre> prefix - id to use for the parent <div> class HTML class to use for div and prefix for open/close, defaults to 'prefix' option render_value - custom renderer for values</pre> <!-- Edit below this comment --> <!-- Pod2Wiki= --> <!-- Pod2Wiki=head_action_list --> ===action_list=== <source lang="perl">$node = $xhtml->action_list( $actions, %opts ) </source> Returns an unordered list (<UL>) of actions on a single line. $actions is an array reference of XHTML fragments (e.g. icons or buttons). <!-- Edit below this comment --> <!-- Pod2Wiki= --> <!-- Pod2Wiki=head_action_definition_list --> ===action_definition_list=== <source lang="perl">$node = $xhtml->action_definition_list( $actions, $definitions, %opts ) </source> Returns a definition list (<DL>) of actions plus their definitions. $actions is an array reference of XHTML fragments (e.g. icons or buttons). <!-- Edit below this comment --> <!-- Pod2Wiki= --> <!-- Pod2Wiki=head_doc_type --> ===doc_type=== <source lang="perl">$str = $xhtml->doc_type </source> Returns the default DOCTYPE as a string. <!-- Edit below this comment --> <!-- Pod2Wiki= --> <!-- Pod2Wiki=head_copyright -->
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)