$level = '0';$root_parent = '0';if ($parent!='0'){ $level = level_count($parent)+1; $root_parent = root_parent($parent);}
else { $root_parent = $page_id;}
But from my tests during last days i located a real issue concerning the SEO links. Am working on to solve this problem asap.
for pages on level = 0 the root_parent always is '0'
}elseif($parent == 0) { return $page_id; }
When I add a page to the root, the ROOT PARENT is the PAGE ID inside database's root_parent column. (Not "0")
very simple problem is different code for different actions in different files