Skip to content Skip to footer navigation
🏰 Statamic Summit 2027 Feb 16–19 Talks, workshops, and three nights in a German castle. Get Tickets

last_segment

Since you don't always know how many segments your URL will have, you can always grab the last segment.

Example URL: /nestled/safely/under/our/tree

{{ last_segment }}
{{ $last_segment }}
tree