Skip to content

How to index only live versions of pages? #4

@barrykeenan

Description

@barrykeenan

Hi Andrew,

In the docs you show how to filter:

$index->index([
    Page::class => [
        'ClassName:not' => ErrorPage::class,
    ],
    File::class => [
        'ClassName:not' => Folder::class,
    ],
]);

How would I filter to only get live versions of pages? Similar to:

$live_pages = Versioned::get_by_stage(Page::class, Versioned::LIVE);

Many thanks,
Barry

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