-
-
Notifications
You must be signed in to change notification settings - Fork 810
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
Don't set homepage template to null
, if theme.yml is not present.
#6253
Conversation
@@ -32,7 +32,9 @@ public function homepage($content) | |||
$templates = []; | |||
|
|||
// First candidate: Theme-specific config.yml file. | |||
$templates[] = $this->config->get('theme/homepage_template'); | |||
if ($this->config->get('theme/homepage_template')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could save the second look up by saving the result here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know, but I made it in line with the dozen or so other similar statements in that file. If we change this one, we should change all of them to keep it consistent.
$templates[] = $this->config->get('theme/homepage_template'); | ||
if ($this->config->get('theme/homepage_template')) { | ||
$templates[] = $this->config->get('theme/homepage_template'); | ||
} | ||
|
||
// Second candidate: Global config.yml file. | ||
$templates[] = $this->config->get('general/homepage_template'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this one always exist?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should, unless somebody explicitly deletes it from their config.yml
1a71e8a
to
3a0adc9
Compare
3a0adc9
to
509fabd
Compare
No description provided.