Jump to content

is there any undocumented api which can check for a page is a child of a page?


Recommended Posts

Posted

Could you elaborate a bit? Because I read it as if you want to check if a page has a (certain?) parent?

if ($page->parentID == 0) echo "no parent";

Posted

Let say, I have following page structure

Home
   +-------Sample page 1
      +----Child page 1.1
      +----Child page 1.2
      +----Child page 1.3
      +----Child page 1.4
      +----Child page 1.5
   +-------Sample page 2
      +----Child page 2.1
      +----Child page 2.1
      +----Child page 2.1
   +-------Sample page 3
      +----Child page 2.1
      +----Child page 2.2
      +----Child page 2.3
      +----Child page 2.4

While viewing a page say "Child page 2.1", How to know it is a child page of Sample page 2 , Sample page 1 or Sample page 3

Anyway, Macrura has given several api links which may fit for my requirment.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...