Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.2 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Perl Modules

    HTML::LinkList 0.1503

    Download button

    No screenshots available
    Downloads: 430  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Kathryn Andersen | More programs
    Perl Artistic License / FREE
    February 10th, 2011, 09:51 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    HTML::LinkList description

    A Perl module to create a 'smart' list of HTML links

    HTML::LinkList is a Perl module to create a 'smart' list of HTML links.

    SYNOPSIS

    use HTML::LinkList qw(link_list);

    # default formatting
    my $html_links = link_list(current_url=>$url,
    urls=>@links_in_order,
    labels=>%labels,
    descriptions=>�sc);

    # paragraph with ' :: ' separators
    my $html_links = link_list(current_url=>$url,
    urls=>@links_in_order,
    labels=>%labels,
    descriptions=>�sc,
    links_head=>'

    ',
    links_foot=>'

    ',
    pre_item=>'',
    post_item=>''
    pre_active_item=>'',
    post_active_item=>'',
    item_sep=>" :: ");

    # multi-level list
    my $html_links = link_tree(
    current_url=>$url,
    link_tree=>@list_of_lists,
    labels=>%labels,
    descriptions=>�sc);

    This module contains a number of functions for taking sets of URLs and labels and creating suitably formatted HTML. These links are "smart" because, if given the url of the current page, if any of the links in the list equal it, that item in the list will be formatted as a special label, not as a link; this is a Good Thing, since the user would be confused by clicking on a link back to the current page.

    While many website systems have plugins for "smart" navbars, they are specialized for that system only, and can't be reused elsewhere, forcing people to reinvent the wheel. I hereby present one wheel, free to be reused by anybody; just the simple functions, a backend, which can be plugged into whatever system you want.

    The default format for the HTML is to make an unordered list, but there are many options, enabling one to have a flatter layout with any separators you desire, or a more complicated list with differing formats for different levels.
    The "link_list" function uses a simple list of links -- good for a simple navbar.

    The "link_tree" function takes a set of nested links and makes the HTML for them -- good for making a table of contents, or a more complicated navbar.

    The "full_tree" function takes a list of paths and makes a full tree of all the pages and index-pages in those paths -- good for making a site map.
    The "breadcrumb_trail" function takes a url and makes a "breadcrumb trail" from it.

    The "nav_tree" function creates a set of nested links to be used as a multi-level navbar; one can give it a list of paths (as for full_tree) and it will only show the links related to the current URL.

    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    URL list | HTML links | Perl module | HTML | link | URL

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM