HTML::Latemp::NavLinks::GenHtml - A module to generate the HTML of the


HTML-Latemp-NavLinks-GenHtml documentation Contained in the HTML-Latemp-NavLinks-GenHtml distribution.

Index


Code Index:

NAME

Top

HTML::Latemp::NavLinks::GenHtml - A module to generate the HTML of the navigation links.

SYNOPSIS

Top

    package MyNavLinks;

    use base 'HTML::Latemp::NavLinks::GenHtml::ArrowImages';




METHODS

Top

$specialised_class->new('param1' => $value1, 'param2' => $value2)

Initialises the object.

$obj->get_total_html()

Calculates the HTML and returns it.

AUTHOR

Top

Shlomi Fish, <shlomif@iglu.org.il>

BUGS

Top

Please report any bugs or feature requests to bug-html-latemp-navlinks-genhtml@rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=HTML-Latemp-NavLinks-GenHtml. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

ACKNOWLEDGEMENTS

Top

COPYRIGHT & LICENSE

Top


HTML-Latemp-NavLinks-GenHtml documentation Contained in the HTML-Latemp-NavLinks-GenHtml distribution.
package HTML::Latemp::NavLinks::GenHtml;

use warnings;
use strict;

use base 'Class::Accessor';

__PACKAGE__->mk_accessors(qw(
    nav_links_obj
    root
    ));

our $VERSION = '0.1.8';

sub new
{
    my $class = shift;
    my $self = {};
    bless $self, $class;
    $self->_init(@_);
    return $self;
}

sub _init
{
    my $self = shift;
    my (%args) = @_;

    $self->root($args{root});
    $self->nav_links_obj($args{nav_links_obj});

    return $self;
}

sub _get_buttons
{
    my $self = shift;

    my @buttons =
    (
        {
            'dir' => "prev",
            'button' => "left",
            'title' => "Previous Page",
        },
        {
            'dir' => "up",
            'button' => "up",
            'title' => "Up in the Site",
        },
        {
            'dir' => "next",
            'button' => "right",
            'title' => "Next Page",
        },
    );

    foreach my $button (@buttons)
    {
        my $dir = $button->{'dir'};
        if ($button->{'exists'} = exists($self->nav_links_obj->{$dir}))
        {
            $button->{'link_obj'} = $self->nav_links_obj->{$dir};
        }
    }

    return \@buttons;
}

1;