I'm looking for a module that will allow me to create a template that will ask for everything from a page's creator and will put it together nicely. For example it will ask for an image, then a block of text, then another block of text and it will put the image in the top left, wrap the first block of text around it and then put the second block of text under it, with minimal strain on the page's creator. Is there a preexisting module that will let me create this kind of template?

Comments

coreyp_1’s picture

This can be done by creating a custom content type, adding CCK fields, and then theming. No custom modules should be necessary.

CCK (Content Construction Kit) - allows adding custom fields to a node.
Imagefield - CCK widget that allows for uploading a picture.
Imagecache - for automatic re-sizing of Imagefield pictures.
Contemplate (Content Templates) - for making it look how you want.
CSS Injector - for adding custom CSS to specific pages without having to edit the theme.

Some of these modules may have other dependencies.

-Corey

Kyban’s picture

Can it be done without themeing or CSS, I'm trying to stay away from those since I don't have the time to learn them well enough.

WorldFallz’s picture

I'm not sure how you can theme a node without theming. You can use the cck module to add fields to a node form as you describe. It will be rendered with a default appearance. If you want to change that appearance it's done with theming (changing the html) and styling (changing the css).

coreyp_1’s picture

Just give it a try and see what you need and don't need. To tell you the truth, without knowing your design, the question is impossible to answer.

The best way to learn how Drupal works is to take it on a test spin. The modules that I suggested work fine for this implementation. If you don't like their particular functionality, then it is easy to disable and uninstall them.

-Corey

Rhino’s picture

I am not the original poster, but I find myself asking the same question.

In wordpress - for example - there is a "button to push" when you create a post that lets you choose "image on left, wrapped text" or "image on right, wrapped text" or other layouts. I'm sure that something like this is what the person is looking for.

Now with all the above mentioned modules you can create for example iamge-presets for "blog post" that has "small image on front page" and "large image in node". That's all fine and dandy, but if you want to get more advanced than just spitting out the text and image above one another, and wrap text around the image of the front page, you need to dig into either the CSS of the site theme and/or use Contemplate (Content Templates) to make it do what you want.

In Contemplate (Content Templates) you'll need to "edit templates" and now you're met with a daunting task of needing to know code.

Creating templates
Enter PHP code similar to PHPTemplate. The main difference is that you only have access to the $node object. However, PHPTemplate templates only affect output to the page. Contemplate affects display in all site themes as well as RSS feeds and search results.

This will turn off a lot of people who didn't get into drupal for the fun of tweaking every-little-thing, and instead were just looking for "a CMS that plain does stuff". How does one solve the rather simple task of "on the front page, display teaser with image on the left, text wrapped - in full body node, display large image underneath text" when no recipes on how to do this can be found?

I might have missed some, but if there are any howto's solving common layout wishlists, I'd love to see them. Thanks in advance. (ps - I don't mean to thread hijack but this is the post I find when looking for help on this matter)

WorldFallz’s picture

drupal is far more modular and flexible than wordpress-- there's often several methods for the same function. In this particular case, you might want to checkout the image_assist or imagebrowser modules, but there are others.

Rhino’s picture

I'm not sure my question has been fully understood despite my verbosity.

Image assist is out of the question, it allows you to pick an image from a library of images and I already have several thousand images. I've tried it and turned back since: Clicking the link opens an image browser, displaying all images that have been uploaded via the Image module.. This is unmanagable when I have thousands upon thousands of images already as browsing for images becomes impossible.

Instead I'm using Image toolkit, ImageAPI, Images & ImageCache where I can set presets such as "small image in teaser which links to node" and "Large image in node which does nothing" (would be awesome if we could make this link to original sized image which is often larger than the website theme allows but I digress)

With this I also use CCK and have created special image fields depending on which node type we are in. A 'news story' thus, has uploading possibilties for any amount of images, yet I can only get this to create a node with HEADLINE - Teaser - small image and when read in full HEADLINE - FUll Text - Large images. I should be able to theme this so that the images are placed with wrapped text around it, and even the Content templates tells me that I can. However, I do not know how and am asking if there are any examples out there.

There are hundreds of modules, I'm asking for help in realizing the potential of the one I'm using not for replacements.

WorldFallz’s picture

Image_assist is view based, so you can tweak the view that displays the images however you want. I don't have thousands, but I have hundreds, and I tweaked the view to add filters for all sorts of things to make finding images much easier if anything.

Regarding your specific question about the contemplate module-- no, it's not really possible to use it without manipulating a bit of code. In fact, that's the entire purpose of the module really, since what it does can be done with just theming. It makes coming up with the code and theming you want much simpler.

You can theme a node to appear any way you wish-- but it's going to require some minimal amount of code and css skills. Like I said in reply to the original poster, I'm not sure how you can theme a node without actually doing any theming. The same would be true of an old fashioned static website btw. Though, in that case, there are some commercial tools available that try to emulate wysiwyg type editing of a static site (ie frontpage, dreamweaver, etc). It's no coincidence that the better of those type of tools cost more then a little money.

There may even be some CMS's that provide that type of interface, though I'm not aware of any that are open source. All the ones I know require you get your hands a little dirty when you want to take complete control of look and feel.

Because appearance involves endless options, there's no magic recipe someone can give you to get the look you want. If you ask specific questions, you'll get specific answers, but even then you'll have provide lots of details. For example, answering "on the front page, display teaser with image on the left, text wrapped - in full body node, display large image underneath text" depends somewhat on your theme. But in general, you should be able to do this entirely with css. Most themes provide 'front' and 'node' classes or ids so you could do something like:

#front div.node img {
  float: left;
}

That will take the img tag you placed in the text and wrap the text around it. Then just position the actual imagefield itself directly under the body and you'll get the larger pic, based on your selected imagecache preset, there. However, without access to the page itself, it's impossible to give you 'a recipe'. Too many variables.

Both you and the original poster are looking for a simple answer to a complex question. Sorry, but there's just no magic available for that at this point.

And,yes, you can make an imagefield link to the original size if you wish-- I do it all the time. Usually with lightbox2 or shadowbox to avoid the theme issue.

Rhino’s picture

I've asked a support question to skip threadjacking, it is here: http://drupal.org/node/566030