function _nodehierarchy_toggle_expand_url_params in Node Hierarchy 6
Same name and namespace in other branches
- 5 nodehierarchy.module \_nodehierarchy_toggle_expand_url_params()
 
Get the url params needed to toggle the expansion of the given node id.
2 calls to _nodehierarchy_toggle_expand_url_params()
- _nodehierarchy_toggle_expand_link in ./
nodehierarchy.module  - Get a link which expands or contracts the given node in the site outline.
 - _nodehierarchy_toggle_expand_url in ./
nodehierarchy.module  - Get a url which expands or contracts the given node in the site outline.
 
File
- ./
nodehierarchy.module, line 760  
Code
function _nodehierarchy_toggle_expand_url_params($nid) {
  $expanded_nodes = _nodehierarhcy_get_expanded();
  if (isset($expanded_nodes[$nid])) {
    unset($expanded_nodes[$nid]);
  }
  else {
    $expanded_nodes[$nid] = TRUE;
  }
  $expanded_param = trim(implode(",", array_keys($expanded_nodes)), ",");
  return $expanded_param ? "nodehierarchy_expanded={$expanded_param}" : "";
}