I am using Imagecache / imagefield (filefield) / CCK to auto scale and add images to my story content type. I have created 2 imagecache presets (field_main_story_image, and field_story_image), and added them to the Story content type.
- field_main_story_image: will be used as the image for the teaser, and only 1 image can be uploaded.
- field_story_image: will be used for additional images (1-3 more) and will not be used in the teaser.
I can not figure out how to add these images inline with the body text for the story content type. I have tried using the following modules to accomplish this, but have been unsucessful:
- Filefield Insert
- inline
- ImagePlacement
All of the above module have not worked for me case, as they do not preserve the image cache settings (thumbnail image in teaser links to node, node image links to full image via thickbox.) These features all work when the image is appened to the body (at the end) but not when the image is in the body.
I have contemplate installed, but I am pretty week with my php...
I also tried adding this css to my local.css file, but it did not seem to help at all:
.field-type-main-story-image {
float: left: 5px:
margin-left: 5px;
margin-right: 5px;
margin-top: 5px;
}
.field-type-story-image {
float: left: 5px;
margin-left: 5px;
margin-right: 5px;
margin-top: 5px;
}I would like the story to be laid out something like this...:
{Main Image} story text asdf story text asdf story text asdf story text asdf
story text asdf story text asdf story text asdf story text asdf story text asdf
story text asdf story text asdf story text asdf story text asdf story text asdf
story text asdf story text asdf story text asdf story text asdf story text asdf story text asdf
story text asdf story text asdf story text asdf story text asdf story text asdf {story-image}
story text asdf story text asdf story text asdf story text asdf story text asdf
story text asdf story text asdf story text asdf story text asdf story text asdf
story text asdf story text asdf story text asdf story text asdf story text asdf story text asdf story text
{story image} story text asdf story text asdf story text asdf story text asdf story text asdf story text asdf
story text asdf story text asdf story text asdf story text asdf story text asdf story text asdf
story text asdf story text asdf story text asdf story text asdf story text asdf story text asdf
Where the first {story image} is the first image image uploaded and the second {story image} is the second etc...
Any ideas on how I can accomplish this?
Comments
Maybe this would do as sort
Maybe this would do as sort of a workaround:
{field_main_image}
{field_teaser}
{field_story_image_1}
{field_body_1}
{field_story_image_2}
{field_body_2}
... and then styling field_story_image_(1-3) to float: (left|right).
You have to know the file path to the image
A long standing problem for me too - just got it solved (at least on my end).
http://drupal.org/node/593518
I remember not being able to find a thing about this without having to try many different modules, so I figured I'd write it up. Basically, you just have to determine where your imagefields are being uploaded to (ImageCache module will affect this also), then call your images into the body of your page with a reagular IMG tag, adding a class to point to your style.
Then - in the Display settings for your content type (Page/Story?) you have to "exclude" the image field from displaying (otherwise, you're going to get it twice - once where it occurs in the node $content variable, and once at your IMG tag).