Difference between revisions of "API:EPrints/Box"

From EPrints Documentation
Jump to: navigation, search
Line 70: Line 70:
 
<!-- Pod2Wiki= -->
 
<!-- Pod2Wiki= -->
 
</div>
 
</div>
<!-- Pod2Wiki=item_c_options_handle -->
+
<!-- Pod2Wiki=item_$options{handle} -->
===c_options_handle===
+
===$options{handle}===
  
  <tt>$options{handle}</tt>
+
  $options{handle}
 
Current <tt>$handle</tt>.
 
Current <tt>$handle</tt>.
  
Line 83: Line 83:
 
<!-- Pod2Wiki= -->
 
<!-- Pod2Wiki= -->
 
</div>
 
</div>
<!-- Pod2Wiki=item_c_options_id -->
+
<!-- Pod2Wiki=item_$options{id} -->
===c_options_id===
+
===$options{id}===
  
  <tt>$options{id}</tt>
+
  $options{id}
 
ID attibute of the box. E.g. &lt;div id="my_box"&gt;
 
ID attibute of the box. E.g. &lt;div id="my_box"&gt;
  
Line 96: Line 96:
 
<!-- Pod2Wiki= -->
 
<!-- Pod2Wiki= -->
 
</div>
 
</div>
<!-- Pod2Wiki=item_c_options_title -->
+
<!-- Pod2Wiki=item_$options{title} -->
===c_options_title===
+
===$options{title}===
  
  <tt>$options{title}</tt>
+
  $options{title}
 
XHTML DOM of the title of the box. Note the exact object will be used  not a clone of the object.
 
XHTML DOM of the title of the box. Note the exact object will be used  not a clone of the object.
  
Line 109: Line 109:
 
<!-- Pod2Wiki= -->
 
<!-- Pod2Wiki= -->
 
</div>
 
</div>
<!-- Pod2Wiki=item_c_options_content -->
+
<!-- Pod2Wiki=item_$options{content} -->
===c_options_content===
+
===$options{content}===
  
  <tt>$options{content}</tt>
+
  $options{content}
 
XHTML DOM of the content of the box. Note the exact object will be  used not a clone of the object.
 
XHTML DOM of the content of the box. Note the exact object will be  used not a clone of the object.
  
Line 122: Line 122:
 
<!-- Pod2Wiki= -->
 
<!-- Pod2Wiki= -->
 
</div>
 
</div>
<!-- Pod2Wiki=item_c_options_collapsed -->
+
<!-- Pod2Wiki=item_$options{collapsed} -->
===c_options_collapsed===
+
===$options{collapsed}===
  
  <tt>$options{collapsed}</tt>
+
  $options{collapsed}
 
Should the box start rolled up. Default to <tt>false</tt>.
 
Should the box start rolled up. Default to <tt>false</tt>.
  
Line 135: Line 135:
 
<!-- Pod2Wiki= -->
 
<!-- Pod2Wiki= -->
 
</div>
 
</div>
<!-- Pod2Wiki=item_c_options_content_style -->
+
<!-- Pod2Wiki=item_$options{content_style} -->
===c_options_content_style===
+
===$options{content_style}===
  
  <tt>$options{content_style}</tt>
+
  $options{content_style}
 
The CSS style to apply to the content box. E.g. <tt>overflow-y: auto;  height: 300px;</tt>
 
The CSS style to apply to the content box. E.g. <tt>overflow-y: auto;  height: 300px;</tt>
  
Line 148: Line 148:
 
<!-- Pod2Wiki= -->
 
<!-- Pod2Wiki= -->
 
</div>
 
</div>
<!-- Pod2Wiki=item_c_options_show_icon_url -->
+
<!-- Pod2Wiki=item_$options{show_icon_url} -->
===c_options_show_icon_url===
+
===$options{show_icon_url}===
  
  <tt>$options{show_icon_url}</tt>
+
  $options{show_icon_url}
 
The URL of the icon to use instead of the '''[+]'''
 
The URL of the icon to use instead of the '''[+]'''
  
Line 161: Line 161:
 
<!-- Pod2Wiki= -->
 
<!-- Pod2Wiki= -->
 
</div>
 
</div>
<!-- Pod2Wiki=item_c_options_hide_icon_url -->
+
<!-- Pod2Wiki=item_$options{hide_icon_url} -->
===c_options_hide_icon_url===
+
===$options{hide_icon_url}===
  
  <tt>$options{hide_icon_url}</tt>
+
  $options{hide_icon_url}  
 
The URL of the icon to use instead of the '''[-]'''
 
The URL of the icon to use instead of the '''[-]'''
  

Revision as of 10:56, 4 March 2022

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.4, 3.3) | Revision Log | Before editing this page please read Pod2Wiki


NAME

EPrints::Box - Class to render cute little collapsable/expandable Web 2.0ish boxes.

User Comments


DESCRIPTION

This just provides a function to render boxes in the EPrints style.

User Comments


SYNOPSIS

 use EPrints;
 
 # an XHTML DOM box with a title and some content that starts rolled up.
 EPrints::Box(
      handle => $handle,
          id => "my_box",
       title => $my_title_dom,
     content => $my_content_dom,
   collapsed => 1,
 ); 
 

User Comments


METHODS

User Comments


render

$box_xhtmldom = EPrints::Box::render( %options )

Render a collapsable/expandable box to which content can be added. The box is in keeping with the eprints style.

Required Options:

User Comments


$options{handle}

$options{handle}

Current $handle.

User Comments


$options{id}

$options{id}

ID attibute of the box. E.g. <div id="my_box">

User Comments


$options{title}

$options{title}

XHTML DOM of the title of the box. Note the exact object will be used not a clone of the object.

User Comments


$options{content}

$options{content}

XHTML DOM of the content of the box. Note the exact object will be used not a clone of the object.

User Comments


$options{collapsed}

$options{collapsed}

Should the box start rolled up. Default to false.

User Comments


$options{content_style}

$options{content_style}

The CSS style to apply to the content box. E.g. overflow-y: auto; height: 300px;

User Comments


$options{show_icon_url}

$options{show_icon_url}

The URL of the icon to use instead of the [+]

User Comments


$options{hide_icon_url}

$options{hide_icon_url} 

The URL of the icon to use instead of the [-]

User Comments


COPYRIGHT

© Copyright 2000-2024 University of Southampton.

EPrints 3.4 is supplied by EPrints Services.

http://www.eprints.org/eprints-3.4/

LICENSE

This file is part of EPrints 3.4 http://www.eprints.org/.

EPrints 3.4 and this file are released under the terms of the GNU Lesser General Public License version 3 as published by the Free Software Foundation unless otherwise stated.

EPrints 3.4 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.

You should have received a copy of the GNU Lesser General Public License along with EPrints 3.4. If not, see http://www.gnu.org/licenses/.

User Comments