You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Super handy plugin–using LinkIt with a structure section to build all my site navs.
I just ran into an issue where I was trying to do relatedTo() search based off the current page a user was on to show a sub-navigation and realized LinkIt does not create relationships. I ended up having to do this below to get a sub-navigation working properly:
{## set section sub-navigation #}
{% set parentPage = craft.entries.slug(craft.request.firstSegment).first %}
{% set relatedNav = craft.entries.section('navMain').search('title:' ~ parentPage.title).order('score').first %}
{% set navSub = craft.entries.descendantOf(relatedNav).descendantDist(1) %}
The text was updated successfully, but these errors were encountered:
Super handy plugin–using LinkIt with a structure section to build all my site navs.
I just ran into an issue where I was trying to do
relatedTo()
search based off the current page a user was on to show a sub-navigation and realized LinkIt does not create relationships. I ended up having to do this below to get a sub-navigation working properly:The text was updated successfully, but these errors were encountered: