开发者

Drupal paths in themes

开发者 https://www.devze.com 2022-12-19 02:20 出处:网络
On certain pages drupal_get_path isn\'t working correctly (or it is and I\'ve got the wrong function)

On certain pages drupal_get_path isn't working correctly (or it is and I've got the wrong function) The base path is wrong

Example: Image is supposed to be at http://doma开发者_如何学Cin.com/sites/all/modules/pecapture/images/headline_dontmissout.jpg

But when on http://domain.com/node/9

The URL is http://domain.com/node/sites/all/modules/pecapture/images/headline_dontmissout.jpg

The same happens on the page http://domain.com/admin/build/ and block edit page

How do I get the right path?


added base_path() to beginning of my paths...


base_path (http://api.drupal.org/api/base_path), if you use php code.
In html case, just add "/", like: /sites/all/modules/pecapture/images/headline_dontmissout.jpg
One problem: if you work on subfolder (Drupal installed in internal folder of main site): http://domain.com/subfoldersite, it will not correct, becase will remove "subfoldersite".

0

精彩评论

暂无评论...
验证码 换一张
取 消