1 / 10

Evergreen Customization

Evergreen Customization. 5 hours and 5k later. Goal: Create a human-readable bibliography view in OpenSearch and make it accessible from Evergreen bookbags. Steps:  1. Create htmlBibliography xml stylesheet 2. Add feed to perl modules 3. Add bibliography view option to bookbags.

ltina
Download Presentation

Evergreen Customization

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Evergreen Customization 5 hours and 5k later

  2. Goal: Create a human-readable bibliography view in OpenSearch and make it accessible from Evergreen bookbags Steps:  1. Create htmlBibliography xml stylesheet 2. Add feed to perl modules 3. Add bibliography view option to bookbags

  3. Add HTML Bibliography Stylesheet Copy the htmlcard xml stylesheet file to htmlBibliography xml stylesheet. Edit htmlbibliography stylesheet: • remove linked text • edit page style • edit marc tag information as necessary

  4. Edit Perl Modules Edit feed.pm Add reference to htmlbibliography stylesheet Edit supercat.pm add htmlbibliography-full format tags and feed references. SuperCat adds links to the feeds themselves after the raw MARCXML is transformed, it modifies the output to add the extra links.

  5. feed.pm Changes +package OpenILS::WWW::SuperCat::Feed::htmlbibliography;+use base 'OpenILS::WWW::SuperCat::Feed::htmlcard';++sub new {+       my $class = shift;+       my $self = $class->SUPER::new;+       $self->{xsl} = "/MARC21slim2HumanBibliography.xsl";+       return $self;+}++package OpenILS::WWW::SuperCat::Feed::htmlbibliography::item;+use base 'OpenILS::WWW::SuperCat::Feed::htmlcard::item';++ package OpenILS::WWW::SuperCat::Feed::marctxt; use base 'OpenILS::WWW::SuperCat::Feed::marcxml';

  6. SuperCat.pm Changes  -    push @$list, 'htmlholdings','html', 'marctxt';+    push @$list, 'htmlholdings','html', 'marctxt', 'htmlbibliography';+       <format name='htmlbibliography-full' type='text/html'/>+       <format name='htmlbibliography-full' type='text/html'/>-              qw/opac html htmlholdings marctxt/+              qw/opac html htmlholdings marctxt htmlbibliography/+       $feed->link(bibliography => $base . "/htmlbibliography-full/$id" => 'text/html'); +       $feed->link(htmlbibliography => $base . "/htmlbibliography-full/$rtype/$axis/$limit/$date" => 'text/html');+       $feed->link(+               'htmlbibliography-full' =>+               $base .  "/$version/$org/htmlbibliography-full/$class?searchTerms=$terms&searchSort=$sort&searchSortDir=$sortdir&searchLang=$lang" =>+               'text/html'+       );+         $feed->link( 'unapi-server' => $unapi);

  7. More SuperCat.pm Changes - $type = 'marcxml' if (($type eq 'htmlholdings') || ($type eq 'marctxt'));+       $type = 'marcxml' if (($type eq 'htmlholdings') || ($type eq 'marctxt') || ($type eq 'htmlbibliography'));+ $node->link(bibliography => $feed->unapi . "?id=$item_tag&format=htmlbibliography-full" => 'text/html');

  8. Add View from OPAC Bookbags • Create myopac.bibliography entity in opac.dtd • Add entity to myopac_bookbags.xml • Set link attributes in myopac.js

  9. Opac.dtd +<!ENTITY myopac.bibliography "(Bibliography)"> myopac.js +                       link = $n(row, 'myopac_bb_published_bibliography');+                       link.setAttribute('href', buildExtrasLink( 'feed/bookbag/htmlbibliography-full/'+cont.id(), false));  +                       link.setAttribute('target', '_blank' );+                       unHideMe(link); myopac_bookbags.xml +   <a name='myopac_bb_published_bibliography' class='classic_link hide_me'>&myopac.bibliography;</a>

  10. See it in action Patch for implementation: http://evergreen-server.mohawkcollege.ca/opac/extras/access09-EG-hackfest.bibliography.tgz

More Related