Webman-framework

Lightweight, Component-based, and Database-oriented Web Application Framework

About | Overview | Documentation

 

Documentation > Modules and APIs > webman_dynamic_links

webman_dynamic_links

 

Description:

Component-type module that provides facilities to extract and generate application's link-nodes at specific link path level path based on current active link-node ID. The selected link-nodes will be displayed as web application menus with the help of HTML_Link_Menu_Paginate core module. These application menus are actually a standard HTML hypertext links which provide users an access points to application services via HTTP-GET method.

 

Dependencies:

Webman-framework's Core Modules:

  • HTML_Link_Menu_Paginate (Composition)
Webman-framework's Component-type Modules:
  • CGI_Component::webman_CGI_component (Inheritance)

 

1. View Template

The view template is exactly the one used by and as explained in HTML_Link_Menu_Paginate core module.

<html>
<body>
<!-- start_view_ //-->
<!-- start_menu_ //-->
dynamic_menu_items_
<!-- end_menu_ //-->
<!-- end_view_ //-->
</body>
</html>



 
2. Instantiation and Basic Parameter Setting

  1 my $component = new webman_dynamic_links;       
  2                                                 
  3 $component->set_CGI($cgi);                      
  4 $component->set_DBI_Conn($db_conn);             
  5                                                 
  6 $component->set_Link_ID_Key();                  
  7 $component->set_Link_Path_Level();              
  8                                                 
  9 $component->set_CGI_GET_Data();                 
 10 $component->set_CGI_GET_Data_Carried();         
 11                                                 
 12 $component->set_Link_Separator_Tag();           
 13 $component->set_Non_Selected_Link_Color();      
 14                                                 
 15 $component->set_Template_Default($template_file)
 16                                                 


 
3. Component-type Generic Function Calls

 17 $component->run_Task;                 
 18 $component->process_Content;          
 19                                       
 20 my $content = $component->get_Content;