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

Don't set homepage template to null, if theme.yml is not present. #6253

Merged
merged 1 commit into from
Jan 14, 2017

Conversation

bobdenotter
Copy link
Member

No description provided.

@@ -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')) {
Copy link
Member

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.

Copy link
Member Author

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');
Copy link
Member

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?

Copy link
Member Author

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

@GwendolenLynch GwendolenLynch merged commit ae19062 into release/3.3 Jan 14, 2017
@GwendolenLynch GwendolenLynch deleted the hotfix/no-null-template branch January 14, 2017 09:28
@GwendolenLynch GwendolenLynch added this to the Bolt 3.3 - Feature release milestone Jul 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants