HTML::Widgets::Index

HTML::Widgets::Index is a Perl module for creating web indexes and menus.
Download

HTML::Widgets::Index Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Francesc Guasch and Joaquim Rovira
  • Publisher web site:
  • http://search.cpan.org/~frankie/HTML-Widgets-Index-0.6/Index.pm

HTML::Widgets::Index Tags


HTML::Widgets::Index Description

HTML::Widgets::Index is a Perl module for creating web indexes and menus. HTML::Widgets::Index is a Perl module for creating web indexes and menus.This module renders the index of a document tree using the data stored in a MySQL database generated by anxova. It has a flexible set of render options that gives the webmaster many options on the menu item layout.TableThe tree data must be in a table in a database. The fields of this table should be: id: int identifies the entry uri: varchar(150) link of the entry text: varchar(150) text displayed in the screen id_parent: int the parent of the current entry. The root is 0 ordern: int menu item position on the menuDataSay you have a document tree like this: a a1.html a2.html b b1.html b2 b21.html b22.html b3.html c c1.htmlThen you must enter this in the table : ; First the directory A INSERT INTO index_items (id,id_parent,uri,text) VALUES (1,0,'a','dir A'); ; Now the docs of the a dir INSERT INTO index_items (id,id_parent,uri,text) VALUES (2,1,'a1.html','A first'); INSERT INTO index_items (id,id_parent,uri,text) VALUES (3,1,'a2.html','A 2nd');; Now the directory B INSERT INTO index_items (id,id_parent,uri,text) VALUES (4,0,'b','dir B'); INSERT INTO index_items (id,id_parent,uri,text) VALUES (5,4,'b1.html','B first');; The directory B has subdirs INSERT INTO index_items (id,id_parent,uri,text) VALUES (6,4,'b2','B second section'); INSERT INTO index_items (id,id_parent,uri,text) VALUES (7,6,'b21.html','B 2 1 doc');Notice the uri field is relative, not absolute. You don't need to specify all the path to a document. So you can move docs in the directory, then just change the parent in the table.The items are sorted alphabetically, if you want to change the order displayed in the html, just add the field ordern when you do the insert: INSERT INTO index_items (id,id_parent,uri,text,ordern) VALUES (5,4,'b1.html','B first',2); INSERT INTO index_items (id,id_parent,uri,text) VALUES (6,4,'b2','B second section',1);Requirements:· Perl


HTML::Widgets::Index Related Software