0

We are complete newbies to Drupal, so please forgive us if this is a stupid question. We have googled and googled and cannot come up with an answer.

Basically, we've got a block that has been placed in a region (Hooray, we got that far!) The problem is that we need to reference an image file that is in the sites/all/themes/[theme]/img directory. We have hardcoded this for now, but is there a placeholder that we can put in the block content area that will automatically fill in that path?

Are we going about this in the completely wrong way? We are both very impressed and very overwhelmed with Drupal all at the same time.

Thanks in advance for your help.

1 Answer 1

0

If you have image file in each theme folder use option 1,otherwise it is place in particular theme folder use option 2.

  1. Better use path_to_theme() function to get current theme path.ex: sites/all/themes/test Note: please use php as the input format for your block.
  2. use drupal_get_path('theme','test') for image is placed only in this theme folder.
1
  • There is only one theme for this site so I guess I'll go with Option 2. Thanks for your help!
    – Kevin
    Dec 20, 2012 at 14:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.