"templates" directory curiosity

I was wondering why the “templates” directory is called “templates” and not something like “partials”. It seems in the WordPress world a template is like “template-custom.php” which is in the “sage” directory.

Just curious.

Solved in the upcoming Sage 9 (more info soon) by @QWp6t. Check out the folder structure in both the theme root and the templates directory:

https://github.com/roots/sage/tree/sage-9

Awesome. When is it expected to be released?

I don’t know that we have an ETA on it. If you want to help out, feel free to check out the PR for it to see if any of the tasks in our to-do list interest you. :smiley:

New structure looks great. I can’t wait to use it.

Have to wonder though, (perhaps for Sage 10 or 11…) for those new to Sage, would it make more sense to invert the directory structure? As it stands, what’s traditionally the directory with theme files is chock full of theme development files and zero theme files. That is, it’s all Sage and no WordPress. I know a lot of these tools want to be at the project root but if it’s possible to tuck them away into a /sage or /_dev folder I think the whole thing would be easier to grok for those starting down this path. Something like (just spit balling, not complaining!):

    /sage
        /_dev
            /lib/Sage
            [all of the gulp, composer, bower... files]
        /assets
        /functions (other stuff in /src)
        /layouts
        /partials
        [index.php, page.php, (standard WP template files...), git and 'must root' files]

Which would remove the need for the (rather clever) trick in functions.php because templates would be where Matt decreed. :wink: Plus ‘/functions’ is WPspeak.

Or slightly tidier (’/templates’ is also wpspeak):

    /sage
        /_dev
            /lib/Sage
            [all of the gulp, composer, bower... files]
        /assets
        /functions
        /templates
            /layouts
            /partials
        [index.php, git and 'must root' files]

What I’m trying to get at is that sage’s file/folder structure might give a newcomer the initial impression of ‘What the hell are all of these files??’ and perhaps they could be tucked away a bit. I know sage isn’t intended for novice developers but for those on the cusp, first impressions may count. And like I said, I’m stoked on this new structure—mostly trying to put my mind inside the head of a newcomer.