CLAP CLAP CLAP CLAP CLAP WOOOHOOO! CLAP CLAP CLAP CLAP WHISTLE! CLAP CLAP CLAP CLAP CLAP CLAP CLAP CLAP CLAP WOOOHOOO! CLAP CLAP CLAP CLAP WHISTLE! CLAP CLAP CLAP CLAP CLAP CLAP CLAP CLAP CLAP WOOOHOOO! CLAP CLAP CLAP CLAP WHISTLE! CLAP CLAP CLAP CLAP CLAP CLAP CLAP CLAP CLAP WOOOHOOO! CLAP CLAP CLAP CLAP WHISTLE! CLAP CLAP CLAP CLAP CLAP CLAP CLAP CLAP CLAP WOOOHOOO! CLAP CLAP CLAP CLAP WHISTLE! CLAP CLAP CLAP CLAP CLAP CLAP CLAP CLAP CLAP WOOOHOOO! CLAP CLAP CLAP CLAP WHISTLE! CLAP CLAP CLAP CLAP CLAP CLAP CLAP CLAP CLAP WOOOHOOO! CLAP CLAP CLAP CLAP WHISTLE! CLAP CLAP CLAP CLAP CLAP CLAP CLAP CLAP CLAP WOOOHOOO! CLAP CLAP CLAP CLAP WHISTLE! CLAP CLAP CLAP CLAP CLAP CLAP CLAP CLAP CLAP WOOOHOOO! CLAP CLAP CLAP CLAP WHISTLE! CLAP CLAP CLAP CLAP CLAP CLAP CLAP CLAP CLAP WOOOHOOO! CLAP CLAP CLAP CLAP WHISTLE! CLAP CLAP CLAP CLAP CLAP CLAP CLAP CLAP CLAP WOOOHOOO! CLAP CLAP CLAP CLAP WHISTLE! CLAP CLAP CLAP CLAP CLAP CLAP CLAP CLAP CLAP WOOOHOOO! CLAP CLAP CLAP CLAP WHISTLE! CLAP CLAP CLAP CLAP CLAP CLAP CLAP CLAP CLAP WOOOHOOO! CLAP CLAP CLAP CLAP WHISTLE! CLAP CLAP CLAP CLAP CLAP CLAP CLAP CLAP CLAP WOOOHOOO! CLAP CLAP CLAP CLAP WHISTLE! CLAP CLAP CLAP CLAP CLAP CLAP CLAP CLAP CLAP WOOOHOOO! CLAP CLAP CLAP CLAP WHISTLE! CLAP CLAP CLAP CLAP CLAP CLAP CLAP CLAP CLAP WOOOHOOO! CLAP CLAP CLAP CLAP WHISTLE! CLAP CLAP CLAP CLAP CLAP CLAP CLAP CLAP CLAP WOOOHOOO! CLAP CLAP CLAP CLAP WHISTLE! CLAP CLAP CLAP CLAP CLAP CLAP CLAP CLAP CLAP WOOOHOOO! CLAP CLAP CLAP CLAP WHISTLE! CLAP CLAP CLAP CLAP CLAP CLAP CLAP CLAP CLAP WOOOHOOO! CLAP CLAP CLAP CLAP WHISTLE! CLAP CLAP CLAP CLAP CLAP CLAP CLAP CLAP CLAP WOOOHOOO! CLAP CLAP CLAP CLAP WHISTLE! CLAP CLAP CLAP CLAP.
whew!
Comments
perhaps
For the benefit of those who have not used it, you could mention how you are using it and why you like it?
-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide -|- Black Mountain
-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide
Just getting started with it
I installed it today and started to play around with it. I created a couple blocks and a couple pages. The Views Module allows you to sort and filter content on your site with enormous flexibility and precision. My theme guy tells me it is very friendly for formatting as well as it works well with CSS.
The Views Module delivers on its promise. It is brilliantly executed. IT is the best Drupal Module I have seen yet in terms of just doing what it is supposed to do exceedingly well and with style and flair as well. huge ups to the programmers of this module.
if you would like to display content on your site in lists that are not "out of the box" in appearance and content, go get the Views Module, install it on a test site and play around with it. You can also define paths to the pages you create, and add menu links and tabs as well.
http://drupal.org/project/views
merlinofchaos indeed!
I want to be a farmer.
have you seen the handbook?
Views snippets
-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide -|- Black Mountain
-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide
Docs here
Documentation is at http://drupal.org/node/42592 as well.
Good kung fu.
I want to be a farmer.
Thanks for that link. How
Thanks for that link. How did I miss that!
If you could ever put
If you could ever put together a few pages of newbie-type documentation for Views, I am sure you will win many friends here. Especially interesting would be exactly what you mentioned- adding menu links and tabs.
20 steps to Views Happiness
First things first. A View is a LIST! List, list, list. A List of stuff on your website. You want Views because we're not all happy with the way Drupal builds lists out-of-the-box, and we want to customize our lists.
Install the module from http://drupal.org/project/views. It has an install file, so it works really nicely in 4.7. Upload it to your modules directory, then browse to the modules section in admin and enable the module. That's it.
Enable the module for the users you want to be able to create views using the access control menu.
Go to the Views menu item under Settings. Looks intimidating, right? Not really.
There are many things you can do with Views that go far beyond what you can do with this configuration interface, but we'll leave that for now. If you are ambitious later, go look at the snippets section mentioned above.
So, a simple excersise. 20 steps to views happiness. Let's create a block. To the right you can see a block that says "New Forum Topics" and lists titles. Let's build a View that creates a list like that.
1. Click on the "Add" link.
2. Give it a name "Latest Front Page Items"
3. Don't check anything in the access section because we want everyone to be able to see our cool block.
4. Give it a description for the Blocks admin page: "Latest Front Page Items"
5. Next is the Page section. We're not making a page (but Views pages are cool too!) we're making a block, so just leave this section alone.
6. Now go to the Block section and check the "Provide Block" box because we want Views to provide us with a Block for our View.
7. Give it a title: "Cool Block, eh?" (I'm a Canuck)
8. Let's show five items in our Block, so input "5" in the "nodes per block" section. A node is an item like a story or a blog entry.
9. If you wanted you block to be a preview of a page of the same View, you would check the "More" link. We chose not to make a Page for this view, so we won't do that. You can have both Page and Block Views of the same View.
OK, let's take a little break here. What's a View again? Here's another take on it. A View is just a way of looking at all your stuff on your website. With real world objects you can have several views. You can look from above, from below, from the side, etc. You can look at it through filters that show only certain spectrums of light. You can look really close, or from far away. Viewing the content of your website using Views Module is the same thing. How do you want to see your content? In a list that has node titles, then dates, then times piublished? Do you want to see it as a table or a standard list of items? Do you want to sort alphabetically, from the latest, or from the earliest? All these ways of viewing your stuff can be a single "View". So we're building a block that will give us a particular view of our content on our website.
10. So, we're in the block section of the Views administration, and we just chose not to provide a more link because we're not generating a page for this View. Now we click on "Header". Do you want to put some stuff at the top of the block? Use the Header area. Check "Use Page Header" and Type in the box "The is is my really brilliant introductory paragraph. Hope you like it." The text box can take any kind of input, including HTML and probably images, though I haven't tried that yet.
11. Close the Header section and click on Footer. Same story here. Let's put in a footer. Check the "Use Footer" box and type in the text box "Thanks for looking at my Cool Block. It's my first one."
12. Close Footer and click on "Empty Text". This is here in case the View doesn't generate any results. It could say something like "This View sucks" or "Come back Later for a better View" but we're going to make sure there is some content in our View by picking a big section of content, so don't bother with that for now. Just remember its there in case you need it.
13. Close Empty Text and now we're at "Fields". We need some fields here or our block will be empty and we'll wish we had put something in empty text. (oh, by the way, you can save your View and go back in to edit it some more now if you are worried about your six month old daughter hitting the keyboard). Fields are just the parts of your content you want to display in your View. So the default one that is staring you in the face is a good place to start. "Node: Title" is just the Title Field of your content items. The title. Just the title. Node is a fancy word for a piece of content. So we want to add this to our View because want our list to contain the titles of our content pieces. Click "Add Field". Now you have a field for your view. Look at all the extra stuff you can configure to the right of the field name. When you get better you can play around with the options on these, but for now, let's keep it simple and go with one field with default configuration.
14. Close Fields and skip Arguments (try this later) and go to "Filter". So far we have told Views we want a list of Nodes with Titles in it, but we don't want a list of ALL the nodes on our site. We want something more useful. Let's make a list of all nodes that have been published to the front page. That way, no matter where people are on our site, they can see the list of front page nodes. So, click on the list of Filters and choose "Node: Front Page" and "Add Filter".
15. Skip "Exposed Filters" and click on "Sort Criteria". We want our nodes to be listed in our block with the most recent node first. So, select "Node: Created Time". Now, when you add it, it comes back with an option to sort by ascending or descending. We want latest items at the top, so descending.
16. Save your View!
17. Now, go to Blocks and you'll see your View block listed in the inactive blocks. Enable it and put it where you want. In Drupal 4.7 you can put it in lots of places, but for this excersise, put it in the right column.
18. Save you blocks configuration and you new Views Block will show up on the right. Notice the list has titles of items published to front page, listed with the newest on top. Amazing, eh?
19. Now, go back to Views and start playing around with all the different setting for your block you just created. Change the filters, add arguments, add Fields, take them away again. Each time you save your changes, the block you created on the right hand side will refect the changes. This is a great way to get started with Views and learn the beginnings of what is possible. Think about what you can do with pages! Oh, and in pages you can set the path, so
http://yoursite.com/my/cool/views/pageand you can even out a link to your cool views page in the menu, right from the views configuration interface. That is so amazing. That's Drupal 4.7.20. Go have a beer, because you are now well on your way to understanding Views and you need a bit of time to reflect on all the possibilites. It is a lot more powerful than this simple excercise, but its now up to you to read the documentation at http://drupal.org/node/42592 and learn more.
Have fun. You now have much more power at your fingertips.
Cross-posted at http://blurt.info
I want to be a farmer.
Great post. Thanks again:-)
Great post. Thanks again:-)
thanks...missed a bit in step 8
Append to Step 8: We want a list of items (not a table or a list of teasers or a big list of full items) so leave the default "List Items" the way it is. You can play with this later to see what it does.
oops.
I want to be a farmer.
here
child page here: http://drupal.org/node/59157
:)
-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide -|- Black Mountain
-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide
Good stuff
We need to get people using this module. It really is a masterpiece.
I want to be a farmer.
True
Views is an incredible module.
I'm with sepeck. Please add
I'm with sepeck. Please add that as a child page on the views tutorials. It's excellent, and I thank you very much for writing it, and I'll thank you even more for posting it in the handbook!
-- Merlin
[Point the finger: Assign Blame!]
[Read my writing: ehalseymiles.com]
[Read my Coding blog: Angry Donuts]
-- Merlin
[Read my writing: ehalseymiles.com]
[Read my Coding blog: Angry Donuts]
done
Cleaned it up a bit more and posted it at:
http://drupal.org/node/63230
I guess the Handbook is moderated, so hopefully someone will approve...
Thanks again, Merlin, for this great module. Do you do any contract work? we are a growing Drupal-friendly firm and I'm trying to build up some coder resources.
I want to be a farmer.
generally in less the 24 hours
and it's approved. I added ol and li tags
Your name now joins the list of handbook contributors here
Please also check the 'I contributed Drupal documentation' box in your user profile.
It's only through active contributions do things improve for those that come after us.
Thanks,
-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide -|- Black Mountain
-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide