FoundationPress icon indicating copy to clipboard operation
FoundationPress copied to clipboard

Rename page-templates to templates, or template-parts to page-template-parts

Open kLOsk opened this issue 6 years ago • 2 comments

I notice that in large projects, the src folder is sitting in between page-templates and template parts. Given the src assets can have a lot of sub folders and files in it, there is a lot of tree scrolling necessary to switch between template and template-parts files in most editors. I would propose renaming page-templates to just templates to allow users to quickly find the template part components when working with page templates.

kLOsk avatar Jan 19 '19 01:01 kLOsk

I don't have a problem with that. As far as I know the page-templates folder was already called templates in an older version of FoundationPress.

It was renamed later to page-Templates, but I don't know why.

Maybe we can find the reason in older issues.

derweili avatar Jan 22 '19 07:01 derweili

The templates folder was renamed to page-templates on February 4th 2016: https://github.com/olefredrik/FoundationPress/commit/f714f3350195de55f53337b5ca348d1a1f2222f9

This was done because of recommended template structure. These recommendations changed since 2016. There ist no recommended naming for the templates folder in the "Origanize you files" guidelines: https://developer.wordpress.org/themes/basics/organizing-theme-files/

But it is still mentioned in the "Page Templates" Documentation: https://developer.wordpress.org/themes/template-files-section/page-template-files/

derweili avatar Jan 23 '19 10:01 derweili