I'm starting to work on integrating my design into Drupal by creating a new template. So far, I'm not having much luck. I was able to get a little bit of text to show up by editing the page.tpl.php file, but no images showed up anywhere. The images are already on my server since they were in the html design - do I need to move them somewhere in order to make them show up in the drupal theme? I'm not sure what to do from here.

Comments

vm’s picture

not sure what steps youve taken to create an entirely new template.

most everything for drupal is done in .css files.
i highly suggest using the firefox browser with the free web developer addon.

this shows you all css being used and where. there are a few other editors out there like, crimson editor that work will with evaluating css also. The web dev add on, allows you to adjust your css in real time and if you like it, save it : )

images for the default blue marine theme, can go into the themes/bluemarine folder
other templates use and images folder.

it may help to find a similar layout in the themes area, duplicate the folder call it yourcustomtheme and work from there.

pbarnett’s picture

Hi!

You need to use the image and img_assist modules, which will allow you to upload the images into Drupal from a local directory. Once they've been uploaded (by default, they go in /files/images.

Pete.

markdingemanse’s picture

No, I don't think it's a good idea to use img_assist to upload the images used in your design. Some points on theming and images:

  • Your theme goes in /themes/YOURTHEME.
  • The CSS belonging to your theme goes in /themes/YOURTHEME/style.css.
  • I have found it useful to make a folder /themes/YOURTHEME/images/ where I place my theme-related images. In my CSS, I reference background-images and the like using something like url(images/mybackground.png)

However, to be of more help we'll need to know a little more about the buildup of the design that you want to replicate as a Drupal theme. For example, are your images hardcoded into the HTML of your design, or have you separated content (HTML) from presentation (CSS) and are your images specified in the CSS? And most importantly: you say that the images are already on your server — where precisely are they located currently and how are you trying to refer to them in your new theme?

pbarnett’s picture

Hi!

You're right; you wouldn't use image or img_assist for images used by a theme; I misunderstood and thought that the question was about images in Drupal generally.

Pete.

qualitycrashtests’s picture

Thanks for all the suggestions - I realized that I was totally overlooking something simple and I hadn't made all my links absolute, so nothing was showing up. Once I did that, it started working. Of course, it was something simple :)

Thanks again for all the help.

---------------
Need Affiliate Program Management? I can help!

My (soon to be using Drupal) Blog: www.qualitycrashtests.com