Hi everyone
First let me tell you I'm kind of new to drupal. I tried it a few times in the past, but never too seriously.
anyway:
I'm trying to create a new website.
The deisgn the customer wanted was basicly to have several catagories selectable from the main menu, each of them lead to a Catagory Page. The Catagory Page layout should look abit like this:
(note, example website is in hebrew, but it's not important for the issue at hand)
http://medicart.co.il/%D7%91%D7%95%D7%98%D7%95%D7%A7%D7%A1-%D7%95%D7%9E%...
Note the panel-like summeries with short text, a pic, a title, and a link to the full article.
The thing is, that those panels should be:
a- Created automaticly, the customer wants to add new articles, add a pic, and not think about it anymore.
b- Unknown number, but limited to certain amount per page. (currently 10 panels per page, sorted by date with the ability to ofcourse go look at older pages)
c- The path should be catagory based. for example www.domain.com/milk would have only the milk products. It's worth noting an article could only belong to one catagory and that it's path should be for example www.domain.com/milk/why_is_milk_good_for_you or something like that.
So, if I gathered it right (and I could be wrong), I need to use views, panels (and thus also ctools), taxonomy, and pathauto, right?
I could be wrong. Thing is, I have no idea how to mix those things to make this thing actually happen. What settings to chose, what submodules to activate and how to define them. Can anyone please please help me out here? I'm feeling very lost, seeing how it feels to me like it should be very simple, yet it doesn't work out for me.
Thanks in advance.
Comments
Use the view tool. Perhaps
Use the view tool. Perhaps the grid view.
In each grid, you will show the teaser. It will link to the full article.
Then, you need to work on formatting. I have not messed with this much, but you can specify a css file to make each grid element look how you want.
:)
ok, I feel stupid Care to
ok, I feel stupid
Care to explain what you mean?
Views is a module that you
Views is a module that you will be using extremely often if you plan to work with Drupal in the long run. Here's the project page, where you can download it and see some of the stuff it can do:
http://drupal.org/project/views
For a video on other stuff it can do, check out this video:
http://learnbythedrop.com/drop/147
Panels is a very powerful module, but isn't needed for what you want. Here's a mini-wall of text to get exactly what you need using Views:
In your case, you would download and enable this module and the Views UI module needed to create and edit views, then make a new node view type and add filter it to the content type that you want included in the grid on this page and published only, then add the fields you want (Title, link to the main page, a picture (perhaps cached to a certain size using imagecache http://drupal.org/project/imagecache and whatever else they want included there). Finally, click 'Style' and choose grid. You can now choose an order to arrange it in on the upper right hand corner and do other any other tweaks you may want. To get it to show up on a page, add a new 'Page' variant on the left hand side of the screen and add a page URL on the bottom left of the page you want. Finally, throw some CSS at it to look how you want it to look.
I hope that helps! The Views screen is a little overwhelming at first, and seasoned developer like us often forget that. There are lots of videos and tutorials around that can help you, or you want post back with a section that confused you and we'll be glad to help.
-jludwig
Seems to be the right thing,
Seems to be the right thing, Thanks
However, there is still a couple of thing that doesn't work:
1- No matter what I do, the different "sub nodes" apear in different hight. not allignes in any way. it is ofcourse very ugly.
2- I don't seem to find how I cange the Look And Feel of the resulting view. Where do I change the CSS to make it look better, and not as "clunky"?
Thank, hope I don't bother you too much.
Hi Shany, What do you know
Hi Shany,
What do you know about CSS? Here's something crazy. All of the layouts on the following website use the same HTML:
http://www.csszengarden.com/
In that same way, Views are completely themeable with CSS. To really get it the way you want it, you'll have to play around with it a little bit, so grab Firebug http://getfirebug.com/ and start theming your view! After downloading and enabling Firebug, open it up and click the mouse icon by the Firebug one on the upper left hand side of the panel. This will let you 'Inspect Elements'. Hover over the grid and you should see that area outlined in blue. From here, you can fill in css on the right side of the panel.
You can apply height: 350px; background: blue; border: 4px solid green; to get your grids to be 350px tall with a blue background and a green border. That's a really basic example because these days CSS basically themes the entire web. See this site? Here's what it looks like without css:
http://drupal.org/node/890386
Here's a good tutorial for getting started with CSS: http://www.w3schools.com/css/
Once you've found a look you want, you'll have to add the code to your theme. It might be under /sites/all/themes/mytheme/css/mytheme.css or /sites/all/themes/mytheme/style.css or another combo. You can tell by disabling CSS compression and using... Firebug! Open up the panel, go to the CSS tab, and click the label to the right of 'Edit' to see the styles used.
This might be a little overwhelming, but stick to it!