Skip to content

Trailing slashes #1293

@stuartcusackie

Description

@stuartcusackie

Bug description

Are trailing slashes supported? I can't find a definitive answer to this in any of the existing issues or on Discord.

I have added trailing slashes to each of my collections but calling $entry->url always returns a url without a trailing slash.

Personally I can do without trailing slashes but some of my clients insist on maintaining the slash structure when switching from WordPress to Statamic.

If they are supported by Statamic then I think there is a bug.

How to reproduce

Create a collection with a trailing slash route, e.g.:
{parent_uri}/{slug}/

Call {{ $entry->url }} and noticed that trailing slashes are not visible.

Logs

No response

Environment

Laravel Version: 11.34.2
PHP Version: 8.3.15
Composer Version: 2.7.4
Version: 5.41.0 PRO

Installation

Fresh statamic/statamic site via CLI

Additional details

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions