files referenced in page.tpl.php should be able to be called from the particular site/domain/theme directory.

replace themes/meta with print path_to_theme()

patch attached for page.tp.php only.

CommentFileSizeAuthor
meta.pagetpl.patch6.63 KBjoevstewart

Comments

Ken Collins’s picture

Joe,

Quick question. I did not notice this code print path_to_theme() in any of the default themes that use PHPTemplate, at least at first glance. I had tested the them in root and sub directory installations and it worked just fine, in fact all calls to media sources are supposed to be that way I thought because the $base_url is supposed to complete those, i.e., if you have Drupal installed in a sub folder, it works. Can you tell me more about this and why it is not working for you?

Ken Collins’s picture

As a follow up to this, I wanted to paste in a few referrence URLs:

Use $directory PHPTemplate variable instead of path_to_theme()
http://drupal.org/node/32734

Converting 4.6 themes to 4.7
http://drupal.org/node/25297

These were a pretty good read but I am really confused at this point. If anyone has any pointers, I would greatly appreciate it. The "Converting 4.6 themes to 4.7" mentioned that base href head tag is dead, but I do see it in my 4.7b4 version and I'm not sure what the plan is. Will it be removed on the next build? Should I use $directory and not path_to_theme()

joevstewart’s picture

It does look like using a variable rather than a function call would be much better.

I looked at the Civicspace theme and I thought others and just used the code there.

This is not for a subdirectory of a domain. This fixes the case that the theme directory itself is in a themes subdirectory located in the same directory as the site's settings.php. Long way of saying multi-site setup?

thanks for looking into this further.

Joe

joevstewart’s picture

symptom hinted in Boris' post in one of the links you listed.

http://drupal.org/node/32734#comment-49118

Ken Collins’s picture

Assigned: Unassigned » Ken Collins
Status: Active » Fixed

Made the changes and tested it with my single site setup and it worked just fine there. So hopefully when the next 4.7 comes out (maybe rc) and the base href tag is not there, things will continue to work. I commited the new file to CVS and I really appreciate the heads up on this!

Anonymous’s picture

Status: Fixed » Closed (fixed)