Skip to content

Parameter offset and limit on navigation tag missing #405

Closed

Description

@lightbringer93

In statamic v2 we had additional parameters like limit and offset. This was helpful to create for a example a navigation, where the logo is placed in the middle. When I try to use these modifiers on the current version nothing happens.

E.g.

{{ nav limit="3" }}
    <a href="{{ url }}">{{ title }}</a>
{{ /if }}  
{{ /nav }}
{{ partial:logo}}
{{ nav offset="3" }}
    <a href="{{ url }}">{{ title }}</a>
{{ /if }} 

I solved the problem by

Activity

  1. added
    on deck
    on Mar 4, 2021
  2. mynetx commented on Jul 22, 2026

    @mynetx

    Is this still on the radar? I'd be happy to PR it.

    Plan: add limit and offset params to the {{ nav }} and {{ structure }} tags, matching the v2 behavior. They'd apply to the top level items only, and the tree gets sliced before augmenting, so first/last/index/count stay correct for what's actually rendered. Small change in Tags\Structure plus tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    on deck

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions