Returns a segment by number from any valid URL or URI.
example: /this/is/pretty/neat
{{ example | segment(4) }}
{{ Statamic::modify($example)->segment(4) }}
neat
segment
ModifierReturns a segment by number from any valid URL or URI.
example: /this/is/pretty/neat
{{ example | segment(4) }}
{{ Statamic::modify($example)->segment(4) }}
neat
Submit improvements, related content, or suggestions through Github.
Betterify this page →