I would like to suggest to change /templates to /theme.

That way we can do in our template.php

function subtheme_theme(&$existing, $type, $theme, $path) {
    return _bootstrap_theme($existing, $type, $theme, $path);
}

And it will include our custom *.vars.php as well.

Looks some what more consistent and in line with the base theme.

Comments

Michsk’s picture

Issue summary: View changes
markhalliwell’s picture

Category: Feature request » Bug report
Status: Active » Fixed

Agreed, this should have happened.

Thanks @Lasac!

Committed c5411e9 to 7.x-3.x:

Issue #2170829 by Lasac: Change /templates to /theme in subtheme.

mmrares’s picture

Issue summary: View changes

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

Michsk’s picture

Thanks for committing!

markhalliwell’s picture

Please see the change record associated with this issue. The code in the issue summary will no longer work, nor is necessary as sub-themes now inherit this base-theme's theme registry alters.

Michsk’s picture

Status: Closed (fixed) » Needs work

Sorry for changing this status and i don't want to be nitpicking,,, But; we can now create func.vars.php in the /theme folder, now here's the real but. We can not organize it like Bootstrap does.

For example i want to do some region preprocessing, and would like to do theme/system/region.vars.php, but't thats a no go. I haven't yet looked in to it deeper, just came across this issue at this moment.

markhalliwell’s picture

You sure?

I've been actively working a client project using the dev version (to make sure this kind of stuff works) and I have things structured just like the base-theme.

Have you seen:
https://drupal.org/node/2224003 and https://drupal.org/node/2229627

Michsk’s picture

Status: Needs work » Closed (fixed)

Yes, nice. Thanks. With the latest dev (73) it works. I was using the 72 dev.

Again, thanks. Great job.

  • Commit c5411e9 on 7.x-3.x, 8.x-3.x authored by Lasac, committed by Mark Carver:
    Issue #2170829 by Lasac: Change /templates to /theme in subtheme.
    
ryan.armstrong’s picture

Version: 7.x-3.x-dev » 8.x-3.x-dev
Status: Closed (fixed) » Needs review

Moving this to the 8.x-3.x branch as it has been committed to that branch. Making sure the fix gets tested in the Drupal 8 release.

ryan.armstrong’s picture

Assigned: Unassigned » ryan.armstrong

  • Mark Carver committed c5411e9 on 8.x-3.x.x authored by Lasac
    Issue #2170829 by Lasac: Change /templates to /theme in subtheme.
    
markhalliwell’s picture

Version: 8.x-3.x-dev » 7.x-3.x-dev
Assigned: ryan.armstrong » markhalliwell
Status: Needs review » Needs work

Actually, this needs to be changed back. I now remember why this was originally /templates, that is how everything in 8.x is structured. We should ensure that this is the same when people upgrade.

TBH, it really doesn't matter where you put your files. Bootstrap iterates over all files and directories looking for the .func.php and .vars.php files; it does not check only a specific path.

markhalliwell’s picture

Title: Change /templates to /theme in subtheme » Change /theme to /templates in base-theme and starter-kits
Component: Code » Miscellaneous
Category: Bug report » Task
markhalliwell’s picture

Assigned: markhalliwell » Unassigned
Status: Needs work » Fixed

  • Mark Carver committed cdd042b on 7.x-3.x
    Issue #2170829 by Mark Carver: Change /theme to /templates in base-theme...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.