4 |
## $Id$ |
## $Id$ |
5 |
## ----------------------------------------------------------------------------- |
## ----------------------------------------------------------------------------- |
6 |
## $Log$ |
## $Log$ |
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 |
## Revision 1.4 2003/04/06 01:44:52 jonen |
17 |
## + build links now with help of LinkBuilder class |
## + build links now with help of LinkBuilder class |
18 |
## (one id instead of a bunch of variables... ;) |
## (one id instead of a bunch of variables... ;) |
29 |
class WebExplorer_Module_NavigationList extends WebExplorer_Module_AbstractNavigationList { |
class WebExplorer_Module_NavigationList extends WebExplorer_Module_AbstractNavigationList { |
30 |
|
|
31 |
function propagate() { |
function propagate() { |
|
$linkbuilder = new LinkBuilder(); |
|
32 |
|
|
33 |
|
// default link arguments to branch to a list |
34 |
$link_vars = array( |
$link_vars = array( |
35 |
'ap' => "explorer", |
'ap' => "explorer", |
36 |
'ecl' => "content", |
'ecl' => "content", |
37 |
'ect' => "data", |
'ect' => "data", |
38 |
'ecdlk' => "rpc", |
'ecdlk' => "rpc", |
39 |
'ecat' => "list", |
'ecat' => "list", |
40 |
); |
); |
41 |
|
|
42 |
foreach ($this->result as $value) { |
foreach ($this->result as $value) { |
43 |
$alt_caption = "Alle Elemente des Typs '$value' anzeigen."; |
$alt_caption = "Alle Elemente unterhalb von '$value' anzeigen."; |
44 |
|
|
45 |
// V1: hmm...long time ago... |
// V1: hmm...long time ago... |
46 |
//$url = $_SERVER['PHP_SELF'] . "?" . $this->_control['page_ident_label'] . "=d_list&l_label=" . $value; |
//$url = $_SERVER['PHP_SELF'] . "?" . $this->_control['page_ident_label'] . "=d_list&l_label=" . $value; |
50 |
|
|
51 |
// V3: use LinkBuilder to save vars at session and get unique id instead |
// V3: use LinkBuilder to save vars at session and get unique id instead |
52 |
$link_vars['ecdid'] = $value; |
$link_vars['ecdid'] = $value; |
53 |
$link_guid = $linkbuilder->save($link_vars); |
|
54 |
$url = $_SERVER['PHP_SELF'] . "?lbid=" . $link_guid; |
// modify default link if name of linked node contains '.xml' |
55 |
|
if (stristr($value, '.xml')) { |
56 |
|
$link_vars['ecat'] = 'tree'; |
57 |
|
} |
58 |
|
|
59 |
|
// encoded links: shorter and more cryptic ;-) |
60 |
|
// drawback: guid generation might be expensive, |
61 |
|
// check out guid-pre-generation into some queue... |
62 |
|
// V1 |
63 |
|
//$link_guid = link::store($link_vars); |
64 |
|
//$url = $_SERVER['PHP_SELF'] . "?lbid=" . $link_guid; |
65 |
|
// V2 |
66 |
|
$url = url::short(null, $link_vars); |
67 |
|
|
68 |
$this->nav->add($url, $value, $alt_caption); |
$this->nav->add($url, $value, $alt_caption); |
69 |
} |
} |