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

Custom Templates Hierarchy #1936

Closed
5 of 6 tasks
dmgawel opened this issue Aug 3, 2017 · 0 comments · Fixed by #1941
Closed
5 of 6 tasks

Custom Templates Hierarchy #1936

dmgawel opened this issue Aug 3, 2017 · 0 comments · Fixed by #1941

Comments

@dmgawel
Copy link
Contributor

dmgawel commented Aug 3, 2017

Bug report


What is the current behavior?

Let's say we have a custom page template located in views/template-custom.blade.php. Sage's template hierarchy filter expands it into following template paths:

resources/views/views/template-custom.blade.php
resources/views/views/template-custom.blade.blade.php
views/template-custom.blade.php
views/template-custom.blade.blade.php
views/views/template-custom.blade.php
views/views/template-custom.blade.blade.php

Obviously it works (the list includes views/template-custom.blade.php) but it differs from all other possible template file lists. It may be confusing: for example by the way soberwp/controller parses template paths one cannot create Controller based on custom page template file name.

What is the expected or desired behavior?

I'm not quite sure but probably resulting template list should look like that:

resources/views/template-custom.php
resources/views/template-custom.blade.php
template-custom.php
template-custom.blade.php
views/template-custom.php
views/template-custom.blade.php

Otherwise current behavior should be documented so external plugins like soberwp/controller can act accordingly.


Bug report

Please provide steps to reproduce, including full log output:

Included above.

Please describe your local environment:

WordPress version: 4.8

OS: Mac OS 10.12.5

NPM/Node version: 6.9.4

Where did the bug happen? Development or remote servers?

Dev

Is there a related Discourse thread or were any utilized (please link them)?

No, but I opened an issue in soberwp/controller: soberwp/controller#37

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant