/[cvs]/nfo/php/libs/org.netfrag.app/WebExplorer/Module/NavigationList.php
ViewVC logotype

Annotation of /nfo/php/libs/org.netfrag.app/WebExplorer/Module/NavigationList.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.8 - (hide annotations)
Fri Apr 18 13:33:44 2003 UTC (21 years, 5 months ago) by jonen
Branch: MAIN
Changes since 1.7: +13 -8 lines
CHANGE: link_vars now are passed by contructor arguments
  (so that the AbstractExplorer could handle these...)

1 jonen 1.1 <?
2     /*
3     ## -----------------------------------------------------------------------------
4 jonen 1.8 ## $Id: NavigationList.php,v 1.7 2003/04/16 16:13:04 joko Exp $
5 jonen 1.1 ## -----------------------------------------------------------------------------
6 joko 1.2 ## $Log: NavigationList.php,v $
7 jonen 1.8 ## Revision 1.7 2003/04/16 16:13:04 joko
8     ## updates to 'function propagate': + minor cosmetic update, ++ special mode: 'tree' if value of node ends with '.xml'
9     ##
10 joko 1.7 ## Revision 1.6 2003/04/08 22:40:06 joko
11     ## renamed / revamped shortcut to LinkBuilder (now via url::short)
12     ##
13 joko 1.6 ## Revision 1.5 2003/04/06 04:26:43 joko
14     ## shortcut for LinkBuilder
15     ##
16 joko 1.5 ## Revision 1.4 2003/04/06 01:44:52 jonen
17     ## + build links now with help of LinkBuilder class
18     ## (one id instead of a bunch of variables... ;)
19     ##
20 jonen 1.4 ## Revision 1.3 2003/04/05 21:17:16 joko
21     ## moved code to AbstractNavigationList.php
22     ##
23 jonen 1.1 ##
24     ## -----------------------------------------------------------------------------
25     */
26    
27 joko 1.3 loadModule('WebExplorer::Module::AbstractNavigationList');
28 jonen 1.1
29 joko 1.3 class WebExplorer_Module_NavigationList extends WebExplorer_Module_AbstractNavigationList {
30 jonen 1.1
31 joko 1.3 function propagate() {
32 jonen 1.4
33 joko 1.7 // default link arguments to branch to a list
34 jonen 1.8 //$link_vars = array(
35     // 'ap' => "explorer",
36     // 'ecl' => "content",
37     // 'ect' => "data",
38     // 'ecdlk' => "rpc",
39     // 'ecat' => "list",
40     // );
41    
42     $link_vars = $this->_args['hidden_items'];
43 joko 1.7
44 joko 1.3 foreach ($this->result as $value) {
45 joko 1.7 $alt_caption = "Alle Elemente unterhalb von '$value' anzeigen.";
46 jonen 1.4
47     // V1: hmm...long time ago...
48 joko 1.3 //$url = $_SERVER['PHP_SELF'] . "?" . $this->_control['page_ident_label'] . "=d_list&l_label=" . $value;
49 jonen 1.4
50     // V2: simple add vars to url
51     //$url = $_SERVER['PHP_SELF'] . "?ap=explorer&ecl=content&ect=data&ecdlk=rpc&ecat=list&ecdid=$value";
52    
53     // V3: use LinkBuilder to save vars at session and get unique id instead
54     $link_vars['ecdid'] = $value;
55 joko 1.7
56     // modify default link if name of linked node contains '.xml'
57     if (stristr($value, '.xml')) {
58     $link_vars['ecat'] = 'tree';
59     }
60 joko 1.6
61     // encoded links: shorter and more cryptic ;-)
62 joko 1.7 // drawback: guid generation might be expensive,
63     // check out guid-pre-generation into some queue...
64 joko 1.6 // V1
65     //$link_guid = link::store($link_vars);
66     //$url = $_SERVER['PHP_SELF'] . "?lbid=" . $link_guid;
67     // V2
68     $url = url::short(null, $link_vars);
69 jonen 1.4
70 joko 1.3 $this->nav->add($url, $value, $alt_caption);
71 jonen 1.1 }
72    
73     }
74    
75     }
76    
77    
78     ?>

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed