I have a Structure Section:

  • Home
    • Sub 1
    • Sub 2
  • About
    • List item
    • List item
  • Info

How can I link the «Home»-Entry in a Structured Section to the «Sub 1»-Entry?

Any help is much appreciated. Thanks in advance.

{% set home = craft.entries.section('pages').one() %}
{% set sub1 = home.getChildren().one() %}
link: <a href="{{ sub1.getUrl() }}">{{ sub.title }}</a>
|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.