Hi,

I'm just starting to get up to speed on theming so hopefully my question should be easy to answer.

I'm designing a custom theme with a folder structure of /sites/all/themes/theme-name/
with seperate folders for images (/sites/all/themes/theme-name/images) and css (/sites/all/themes/theme-name/css)

Any images reference via css (eg. background images) show correctly in my page.tpl.php file however any images I insert directly with an Only local images are allowed. tag in the page.tpl.php file don't appear. Obviously, it's something to do with paths - so what's the correct way to insert an image from a custom theme/images folder into my page.tpl.php file?

Thanks in advance for any help!

Comments

WorldFallz’s picture

Try the following in page.tpl.php:

<img src="/<?php print drupal_get_path('theme','theme-name'); ?>/images/image.png" />
victoria_b’s picture

Brilliant. Worked like a charm.

WorldFallz - thanks for the prompt solution!

Victoria

WorldFallz’s picture

excellent-- happy to help. ;-)

abaloo’s picture

I have this same issues, but the posted solution just isn;t working for me. Am I missing something?

Please please please help.

abaloo