Skip to main content
ExLibris
  • Subscribe by RSS
  • Ex Libris Knowledge Center

    OPAC: Create External Link Footer Tab

    Created By: Jim Robinson
    Created on: 5/14/2019



    [This article was copied from the Voyager Wiki.]

    To create footer tabs that link to another server, I use a simple CGI script.

    redirect.cgi

    #!/m1/shared/bin/perl -w

     

    local ($buffer, @pairs, $pair, $name, $value, %FORM);

     

    # Get

    $ENV{'REQUEST_METHOD'} =~ tr/a-z/A-Z/;

    if ($ENV{'REQUEST_METHOD'} eq "GET") {

        $buffer = $ENV{'QUERY_STRING'};

    }

         

    # Split information into name/value pairs

    @pairs = split(/&/, $buffer);

    foreach $pair (@pairs) {

        ($name, $value) = split(/=/, $pair);

        $value =~ tr/+/ /;

        $value =~ s/%(..)/pack("C", hex($1))/eg;

        $FORM{$name} = $value;

    }

       

    $page = $FORM{page};

     

    print "Location: $page\n\n";

    Save this as /m1/voyager/xxxdb/tomcat/vwebv/context/vwebv/htdocs/vwebv/redirect.cgi

    Set owner and permissions:

    cd /m1/voyager/*xxxdb*/tomcat/vwebv/context/vwebv/htdocs/vwebv

    chown voyager:endeavor redirect.cgi

    chmod 755 redirect.cgi

    Let's make a footer tab that links to Google.

    Create the new tab/button in /m1/voyager/xxxdb/tomcat/vwebv/context/vwebv/ui/skin/webvoyage.properties

    ###############################################################################

    #

    #   Footer

    #

    ###############################################################################

    page.footer.buttons.google.button=Google

    page.footer.buttons.google.message=Visit Google today!

    Tell the tab/button what to do in /m1/voyager/xxxdb/tomcat/vwebv/context/vwebv/ui/skin/internal.properties

    ###############################################################################

    #

    #   Footer

    #

    ###############################################################################

    page.footer.buttons.google.action=redirect.cgi?page=http://www.google.com

    Display the new tab/button in /m1/voyager/xxxdb/tomcat/vwebv/context/vwebv/ui/skin/xsl/userTextConfigs/papgeProperties.xml

    <!-- ## Footer Tab Display Order ## -->

       <footerTabDisplayOrder>]

          <tab name="page.footer.buttons.google.button"/>

       </footerTabDisplayOrder>

    Call the redirect script with
    http://your.domain/vwebv/redirect.cgi?page=http://www.google.com
    where page= the page to which you'd like to link.




    • Was this article helpful?