0

I need to check the child IDs for a parent or top page in a conditional. However, Structure natively only provides {structure:child_ids} and {structure:child_ids_for:XX} globals. How can I rig up {structure:child_ids_for:top} and/or {structure:child_ids_for:parent} functionality?

(Question first posed this question on Twitter.)

1

Combining the native global tags seems to work:

{structure:child_ids_for:{structure:top:entry_id}}
{structure:child_ids_for:{structure:parent:entry_id}}
0

I really wish I could get this to work inside a conditional... I can get it to render a list of child ids when used on it's own but within a conditional it doesn't work. Ideas?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.