Last updated October 6, 2006. Created by Squidgy on September 7, 2006.
Edited by pwolanin. Log in to edit this page.
PLEASE NOTE These snippets are user submitted. Use at your own risk.
Pretty simple and yet handy snippet for the PAC tree module - this assumes only one level of depth, which is quite naive of me, but it's all I needed for the current site. Anyone who wants to stretch it a bit, go nuts.
<?php
//Summons the Parent NID and Title
$parent_list = pacs_node($node->nid);
$parent = pacs_node($parent_list["pid"]);
print $parent_list["pid"] . $parent["title"];
?>Potential uses: On a child page, create a new 'brother' page under the parent node's id, at the same level as the current node.
<?php
$_SESSION['pacs_new_node_pid'] = $parent_list["pid"];
print '<a href="node/add/">New Brother Node</a>';
?>