Please use $directory in all PHPTemplate themes -- this is already pre-defined and cached, and actually works in multi-site setups where themes are installed at sites/example.com/themes/civicspace.

Also...it would be good if you removed any of the sub-themes that aren't actually ported yet. It just causes confusion when it gets downloaded and one of the sub themes get selected that have empty stylesheets (e.g. spreadspread).

Comments

traemccombs’s picture

Assigned: Unassigned » traemccombs
traemccombs’s picture

Priority: Normal » Critical

Amazon suggest setting this as a high priority bug. Can you please help me understand what this is exactly? And provide any thoughts on fixing the problem?

Thanks,
Trae

boris mann’s picture

Just replace all instances of path_to_theme() with $directory.

If you look at the handbook page for page.tpl.php, you'll see the variable is defined there. PHPTemplate theme engine automatically fills this with the path to the theme, and this is in fact cached as well, I believe.

Why is it critical? Well, the themes don't work at all in a multi-site setup (where the theme is in sites/example.com/themes) if you don't use $directory for the various includes. Don't know if that is an error with path_to_theme or what, but it's "best practice" to just use the $directory variable...leave as little functions as possible in the actual template.

traemccombs’s picture

Wow, thanks tons Boris for the great feedback and help. I'll get with Robin Monks and we'll try and get this fixed ASAP.

I do appreciate all your help in this matter.

Yours,
Trae

traemccombs’s picture

Status: Active » Fixed

I replaced all instances of path_to_theme() with $directory as instructed. Sorry this took so long. Please let me know if this fixes this bug. I'm going to mark as fixed, and then close if I don't hear anything back.

Thanks again,
Trae

traemccombs’s picture

Status: Fixed » Closed (fixed)