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

Update autopublish.php #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Update autopublish.php #6

wants to merge 1 commit into from

Conversation

oliverschneider
Copy link
Contributor

Sometimes there are reasons why one could define a specific blueprint that has no other template than default. Could be because of permissions (Kirby 2.4+) based on a template. Autopublish doesn't work for these use cases as $page->template() returns "default" if the corresponding template doesn't exist. Changing $page->template() to $page->intendedTemplate() solves this problem.

Sometimes there are reasons why one could define a specific blueprint that has no other template than default. Could be because of permissions (Kirby 2.4+) based on a template. Autopublish doesn't work for these use cases as $page->template() returns "default" if the corresponding template doesn't exist. Changing $page->template() to $page->intendedTemplate() solves this problem.
@flokosiol
Copy link

If you don't want to change the current behavior, @groenewege, it could be a config option if template() or intendedTemplate()` should be used!?

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.

2 participants