Skip to content

isChildOf() method always returns true #2255

@texnixe

Description

@texnixe

Describe the bug
Whatever you pass to the isChildMethod() it always returns true.

Let's say you are in the Starterkit and add the following code in the note.phptemplate:

var_dump($page->isChildOf('notes'));

rightly returns true, but

var_dump($page->isChildOf('photography'));

falsely also returns true.

Expected behavior
The method should create a page object from a string if a string is passed and then compare the parent to that the given page or the page created from the string.

Kirby Version
3.0.0-rc-1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions