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?
1 Answer
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}