Script help: Get Array of Page Parents
-
I hope someone can help me out with this challenge. It is related to a previous post of mine (https://www.ads-software.com/support/topic/32310).
I need a function that will return an array of a page’s hierarchy. Basically I want an array containing each of a page’s parent’s IDs.
Food (id=5)
– Desserts (id=7)
– – Cookies (id=9)
– – – Chocolate Chip (id=12)So if I was on the Chocolate Chip page, a call to the function would return an array containing the following: (5, 7, 9).
Thanks so very much for your help.
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- The topic ‘Script help: Get Array of Page Parents’ is closed to new replies.