开发者

Drupal paths in themes

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜