By eviljoker7075 on
Hey. I am trying to use the views module to create a block that displays an image (specified via CCK) from the last three submitted nodes horizontally next to each other.
Usint the contemplate and CCK modules I've made the views module output a block that displays the image, along with the node title, creation date and user who created it, and the comment link - and displays each of these in a vertical way.
Is there any way I can tell the views module to display each result on the same line, rather than breaking to the next?
Comments
From what you said you are
From what you said you are using viiews to produce a teaser or full node list. The view will output a wrapper around the nodes and have a class name that reflects the view name. So if the view name was 'frontpage' there will be a div with a class name of 'view-frontpage'. If those are standard teaser/node lists the nodes will have an outer div with the class 'node'. So something like
in style.css should get you going You may also need to give .view-frontpage a height, something like
Ok, that makes sense. Two
Ok, that makes sense. Two questions though:
1. where do i find style.css? I've looked in the one in my theme folder and can't find anything in there...
2. Is there any way of simply outputting what I have specified in the contemplate teaser area? In other words get rid of the comment link, the node datestamp and node title?
Thanks for your hlep so far...
For most themes you should
For most themes you should find a style.css in the theme folder (ex: themes/garland/style.cc).
As for two, the "extra" information is output as part of node.tpl.php and can not be controlled by comtemplate (it only controlls the layout of the nodes content). So you can modify node.tpl.php (or node-{type}.tpl.php, ex node-story.tpl.php to limit to only the type you are using) so it does not output the information. You can limit what is output for the teaser and or full view of the node. With a little theming of the view you can also provide information in node.tpl.php so it "knows" the output is part of a view and theme as needed.
An alternative approach is to use a list view, only select the fields you are interested in and theme the view,
ok, I think I've just about
ok, I think I've just about got to grips with the node.tpl.php thing, that's all cool... Still having problems with the css file though.
Should the stuff be automatically added by the module, or do I need to create it myself?
Not sure what you mean by
Not sure what you mean by "Should the stuff be automatically added by the module, or do I need to create it myself?". If you mean style.css it typically comes with the theme. If you mean the css, you will need to add it to style.css
I mean the actual code yeah,
I mean the actual code yeah, not style.css
Ok, I'm with ya now! So the views module will wrap that code round the output automatically, it's just up to me to create the corresponding css code?
I got it! Thank you so much
I got it!
Thank you so much :) I really appreciate your help here. Thank you!!