Skip to content

Collection items can't have same basename #674

@Krisseck

Description

@Krisseck

Two items in a collection cannot have the same basename, only one of the items is created.

For example, if you have collection folder _posts, with files:

- example-post.blade.php
- some-folder/example-post.blade.php

Only one "post" will be created, whichever file was first encountered when scanning for files.

I think the problem is related to this:

$pageData->setPageVariableToCollectionItem($this->getCollectionName($file), $file->getFilenameWithoutExtension());
since page data is set to be keyed by getFilenameWithoutExtension, which is basename of the file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions