GetSimple Support Forum
QUESTION if_parent; if_child - Printable Version

+- GetSimple Support Forum (
+-- Forum: GetSimple (
+--- Forum: Themes (
+--- Thread: QUESTION if_parent; if_child (/showthread.php?tid=6024)

if_parent; if_child - kjodle - 2014-03-29

I am wondering if there is a way to determine if a given page is a child page, a parent page, or both.

My ultimate goal is that if a page is a parent page, I would like to display a list of their child pages, if a page is a child page, I would like to display a link back to the parent, and if it is both, then it would display both links.

RE: if_parent; if_child - shawn_a - 2014-03-29

if(getChildren or getChildrenMulti etc
in caching_functions

for is child check
$pagesArray[$pageId]['parent'] is not empty()
returnPageField($page,'parent') not empty

RE: if_parent; if_child - kjodle - 2014-03-31

Thanks! I'll try that and see how it goes.