creating content - reference css file, img folder
helavissa - May 25, 2009 - 16:56
Hi!
I am new to Drupal, so any help is greatly appreciated.
So I want to add a single page that contains images and is also using css file. Normally I would have an html file and in addition css file and img folder.
But how does it work in Drupal? Where to put these extra files and folders?
Looking forward to reply, thank you for reading.

going from html site to drupal
In Drupal, the css is part of the theme you choose. The relationship between the html file and the css file that you are used to doesn't apply. To learn more about theming in Drupal, look here http://drupal.org/theme-guide.
To create a page that includes an image, you can do the following. Once you get used to how Drupal works, you can venture forward and explore all the other image management and display options available. The steps below are as close as you can get to the way traditional html sites work.
1. Use FTP to upload your image file to the server. But in this case, place your image in the sites directory. You can store your images in the sites/default directory or in sites/all. You will want to create a files and images directory - for example - /sites/all/files/images
2. Once you have your image uploaded you can create your content page and include your image. Go to admin > content management > create content and select page. In the body field, enter the html and text that you would normally enter between the body tags in an html file. When you want to add your image, use the img tag with a path like this /sites/all/files/images/filename.jpg.
Does that help?
c
IDCM
thank you very much for a
thank you very much for a reply, idcm,
I did exactly as you said, I have folder files in sites/all with img folder there. And in the body field of a page I have img tag with appropriate path, but the image still won't display. Also, I have full html for input format. Any ideas who it still doesn't work?
how is the site hosted?
Are you on a localhost setup running from a window machine? If yes, I had this problem and don't for the life of me know why images wouldn't show up. I decided to put my dev site up on the my the server and it was fine.
OR
Are you using
<img src="/sites/all/img/filename.ext" />or are you using<img src="sites/all/img/filename.ext" />can you include a link to the page?
IDCM
yes! i am using localhost on
yes! i am using localhost on windows, i wanted to mention it but forgot.
thank you very much, so i guess it just doesn't work.
question about image module
Actually, if I use Image module, then I can attach an image, but it seems like I can only attach one, and then how do I specify its location?
It looks like image module is not smth that I need (I need a table that contains images), is it true? What is it used for then?
consider going to unix or linux server now
if you are building a site that will eventually go live on a server, I recommend getting on a server now. If not, you could you an absolute link to the image (http://yadayada.../filename.) but then you will want to make them virtual links when you do get to the server - lots of extra work.
You can put the site in offline mode so no one sees it - see site maintenance under site configuration.
OR
As for image module and the other image related modules, I suppose you could try the contemplate module and use php to format the image placement and the body. Or you could use composite module to do a layout. I use it, see this page http://idcminnovations.com/projects/post-harvest-hub-site. I have been pondering alternatives myself but keep falling back to old school (img tag).
Look into imagefield as well. this might work better with composite.
Then you have the WYSIWYG API module. some of the tools allow you to upload images and place them like traditional web page dev tools do.
Lastly, Flickr module offers an option if you images are on Flickr. Check out http://idcminnovations.com/article/using-drupals-flickr-module for information on how to use Flickr.
IDCM
idcm, why do you recommend to
idcm,
why do you recommend to get on server?
I thought it's okay to develop on localhost and then upload it later, i don't know how it works with drupal though.
For me, it was the image
For me, it was the image issue. I couldn't always get the images to show and I couldn't afford to build a site that works on localhost only to find i have to edit things I go to a server. Localhost was okay for getting my feet wet with D6 but when I decided that I need to upgrade my D4 site to D6 versus reinventing it, I decided to do the upgrade and work on the server. It was just easier for me. You do what you want - I still use two instances of localhost for minor testing and so I can see my old D4 site so I am not saying it is not okay. I just didn't like the hassle of wondering if something wasn't working right because I was on localhost versus the server.
IDCM
thank you!
thank you!