ePortal::PageView - Custom home page of ePortal.


There are 3 types of PageView:

  • user - personal home page of a registered user

  • default - only one PageView may be default. This is default home page of a site

  • template - There may be many templates. Administrator may restrict access to these pages;



Return a number of columns in the current PageView.


Returns array of numbers with width in percent of PageView's columns. Narrow column counts as 1, wide column - as 2. For two-column PageView (N:W) result would be (33,66).

Note: The percent sign is not included after numbers.


Returns array (\@values, \%labels) with available sections for addition to the column. References returned are ready to pass to CGI::popup_menu(...)

column_number is number of desired column in PageView.


Does restore_where(for the column) on ePortal::UserSection object.

If $column is undef then all UserSection (for all columns) are selected. This is the same as call to children().

Returns ePortal::UserSection object ready to restore_next().


Copy PageView object from denoted by $template_id to current one. The pvtype attribute is changed to 'user'. Also copies all daughter UserSection objects.

Returns: 1 on success.

ePortal::PageSection object

ePortal::PageSection package is used to implement a single section on a home page with a dialog box around it.

Customization of a PageSection is available with a corresponding HTML::Mason component file. Some predefined method should exists in this component.

Here is a brief description of PageSection's component file:

The content of a section

To produce a content the component is called with one parameter: ePortal::UserSection object. Individual settings are available with setupinfo hash stored in database;

 my $section = $ARGS{section};  # ePortal::UserSection object
 my $setupinfo = $section->setupinfo_hash;
 HTML code is here


To initialize PageSection object define some attributes:

 def_title => { eng => 'Resources catalogue', rus => 'Êàòàëîã ðåñóðñîâ'},
 def_width => 'N',
 def_url => '/catalog/index.htm',
 def_setupinfo_hash => {}
 def_xacl_read => 'everyone'

setup_dialog method

This method is used to customize a section with a setup dialog. {old_setupinfo} is used for compatibility with old version of ePortal.

 <%method setup_dialog><%perl>
  my $setupinfo = $ARGS{setupinfo};
  if ( $setupinfo->{old_setupinfo} ) {
    $setupinfo->{filename} = $setupinfo->{old_setupinfo};
    delete $setupinfo->{old_setupinfo};
 <&| /, label => pick_lang(rus => "Èìÿ ôàéëà", eng => "File name") &>
 <& /, id => 'filename', 
                          -size => 40,
                          value => $setupinfo->{filename} &>

This dialog may be disabled for ordinary users with special attribute

 disable_user_setup_dialog => 1

setup_validate method

This method is used for setupinfo data validation.

 <%method setup_validate><%perl>
  my $setupinfo = $ARGS{setupinfo};
  my $obj = $ARGS{obj};
  if ( $setupinfo->{filename} eq '' ) {
    throw ePortal::Exception::DataNotValid( -text => ...);

setup_save method

This method is used to save custom data into setupinfo hash.

 <%method setup_save><%perl>
  my $setupinfo = $ARGS{setupinfo};
  my $args = $ARGS{args};

  foreach (qw/ filename /) {
    $setupinfo->{$_} = $args->{$_} if exists $args->{$_};


Sergey Rusakov, <>

1 POD Error

The following errors were encountered while parsing the POD:

Around line 386:

Non-ASCII character seen before =encoding in ''Êàòàëîã'. Assuming ISO8859-1