Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inherited Slides #59

Closed
jsirish opened this issue Jun 21, 2016 · 0 comments
Closed

Inherited Slides #59

jsirish opened this issue Jun 21, 2016 · 0 comments
Milestone

Comments

@jsirish
Copy link
Member

jsirish commented Jun 21, 2016

add to FlexSlider to allow Slides to be inherited from parent pages recursively

public function getPageSlideShow()
{
    if ($this->owner->hasMethod('Slides') && $this->owner->Slides()->exists()) {
        return $this->owner->Slides();
    } else {
        return self::getParentSlides($this);
    }
}

private function getParentSlides(Page $page)
{
    $parent = $page->Parent;
    if ($parent && $parent->hasMethod('Slides') && $parent->Slides()->exists()) {
        return $parent->Slides();
    } elseif ($parent) {
        return self::getParentSlides($parent);
    }
    return null;
}
@jsirish jsirish added this to the 1.0.0 milestone Jun 21, 2016
@muskie9 muskie9 modified the milestones: 1.1.0, 1.0.0 Sep 20, 2016
@muskie9 muskie9 closed this as completed May 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants