mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 11:05:58 +02:00
BUGFIX: BlogTree always got LandingPageFreshness value from its parent
This commit is contained in:
parent
2e58553940
commit
8589682b7e
@ -69,10 +69,9 @@ class BlogTree extends Page {
|
||||
public function getLandingPageFreshness() {
|
||||
$freshness = $this->getField('LandingPageFreshness');
|
||||
// If we want to inherit freshness, try that first
|
||||
if ($freshness = "INHERIT" && $this->getParent()) $freshness = $this->getParent()->LandingPageFreshness;
|
||||
if ($freshness == "INHERIT" && $this->getParent()) $freshness = $this->getParent()->LandingPageFreshness;
|
||||
// If we don't have a parent, or the inherited result was still inherit, use default
|
||||
if ($freshness = "INHERIT") $freshness = '';
|
||||
|
||||
if ($freshness == "INHERIT") $freshness = '';
|
||||
return $freshness;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user