1

In Structure you can get the parent entry_id using {structure:parent:entry_id} but is there any way to get the grandparent entry_id?

2

I figured it out...

{exp:query sql="SELECT parent_id as grandparent_id FROM exp_structure WHERE entry_id = {structure:parent:entry_id}"}
 {grandparent_id}
{/exp:query}
| improve this answer | |

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.