Skip to content

Instantly share code, notes, and snippets.

@piotrpog
Created August 3, 2020 06:47
Show Gist options
  • Select an option

  • Save piotrpog/5c34d9de9b167dc2edca52ea2db7efdb to your computer and use it in GitHub Desktop.

Select an option

Save piotrpog/5c34d9de9b167dc2edca52ea2db7efdb to your computer and use it in GitHub Desktop.

Revisions

  1. piotrpog created this gist Aug 3, 2020.
    1 change: 1 addition & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    {{ craft.navigation.nodes().ancestorOf( craft.navigation.nodes('test').all()|filter(x => x.element.id == id)|first.id ).ancestorDist(1).one().element.uri ?? null }}/{{slug}}