Skip to content
Permalink
Browse files
Fix custom view render_fn appending Documents
parse_xml() returns a Document, which was being appended causing an XML lib
error.

Fixes #12
  • Loading branch information
Tim Brody committed Jan 17, 2013
1 parent c0baf32 commit 8502ceba8ea7744105db040f258ea7ab70fc6f7e
Showing with 2 additions and 5 deletions.
  1. +1 −4 lib/defaultcfg/cfg.d/views_render_items_example.pl
  2. +1 −1 perl_lib/EPrints/Update/Views.pm
@@ -1,9 +1,6 @@

# This is an example of a custom browse items renderer.

# Note: This function needs to return a UTF-8 encoded string NOT XHTML DOM.
# (this is to speed things up).

# To use this add render_fn=render_view_items_3col_boxes" to the options of a variation of a view.
# eg:
# variations => [
@@ -45,6 +42,6 @@
$cells += 1;
}

return $xml->to_string( $table );
return $table;
};

@@ -710,7 +710,7 @@ sub update_view_list
$view,
$path_values,
$opts->{filename} );
$block = $xml->parse_string( $block )
$block = $xml->parse_string( $block )->documentElement
if !ref( $block );

$PAGE->appendChild( $xml->clone( $intro ) );

0 comments on commit 8502ceb

Please sign in to comment.