1 |
<? |
2 |
/* |
3 |
## ----------------------------------------------------------------------------- |
4 |
## $Id: NavigationList.php,v 1.7 2003/04/16 16:13:04 joko Exp $ |
5 |
## ----------------------------------------------------------------------------- |
6 |
## $Log: NavigationList.php,v $ |
7 |
## 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 |
## Revision 1.6 2003/04/08 22:40:06 joko |
11 |
## renamed / revamped shortcut to LinkBuilder (now via url::short) |
12 |
## |
13 |
## Revision 1.5 2003/04/06 04:26:43 joko |
14 |
## shortcut for LinkBuilder |
15 |
## |
16 |
## 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 |
## Revision 1.3 2003/04/05 21:17:16 joko |
21 |
## moved code to AbstractNavigationList.php |
22 |
## |
23 |
## |
24 |
## ----------------------------------------------------------------------------- |
25 |
*/ |
26 |
|
27 |
loadModule('WebExplorer::Module::AbstractNavigationList'); |
28 |
|
29 |
class WebExplorer_Module_NavigationList extends WebExplorer_Module_AbstractNavigationList { |
30 |
|
31 |
function propagate() { |
32 |
|
33 |
// default link arguments to branch to a list |
34 |
//$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 |
|
44 |
foreach ($this->result as $value) { |
45 |
$alt_caption = "Alle Elemente unterhalb von '$value' anzeigen."; |
46 |
|
47 |
// V1: hmm...long time ago... |
48 |
//$url = $_SERVER['PHP_SELF'] . "?" . $this->_control['page_ident_label'] . "=d_list&l_label=" . $value; |
49 |
|
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 |
|
56 |
// modify default link if name of linked node contains '.xml' |
57 |
if (stristr($value, '.xml')) { |
58 |
$link_vars['ecat'] = 'tree'; |
59 |
} |
60 |
|
61 |
// encoded links: shorter and more cryptic ;-) |
62 |
// drawback: guid generation might be expensive, |
63 |
// check out guid-pre-generation into some queue... |
64 |
// 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 |
|
70 |
$this->nav->add($url, $value, $alt_caption); |
71 |
} |
72 |
|
73 |
} |
74 |
|
75 |
} |
76 |
|
77 |
|
78 |
?> |