To get parent_id of a child-page ?
Posted: Fri Oct 10, 2008 10:31 am
Hello I try do do a simple thing, to get the parent_id of a child-page.
I've installed CGSimpleSmarty which permits me to get the parent's alias. So it's quite what I needed.
But I was wandering, is there a quick smarty syntax to get the parent_id of a child-page
Something like (not working) :
Or I have to go through an SQL request using the content_id of the child-page in order to get the parent_id ?
I've installed CGSimpleSmarty which permits me to get the parent's alias. So it's quite what I needed.
But I was wandering, is there a quick smarty syntax to get the parent_id of a child-page

Something like (not working) :
Code: Select all
global $gCms;
$thispage = "";
$thispage = $gCms->variables['parent_id'];
echo "<p>Parent ID : ".$thispage."</p>";