View content by content Type

websammy - February 8, 2009 - 22:23

Hi, we would like to have "view content" and "post content" buttons. The post content works fine, users can login in and post content in available content types (categories). But the view button we are having a problem with, we want people to be able to view a list of content types, click one, and then be able to view a list of essays published within those content types.

How would we accomplish this?

Thanks,
ws

It would be quite easy to

MidGe48 - February 8, 2009 - 22:45

It would be quite easy to achieve using Views2 module. You can theme Views as well to present the way you would like within limits.

Have a look at Views if you haven't done so yet.

www.ZuNOB.com

Thanks for awnsering :)

websammy - February 8, 2009 - 23:33

Ok, I have the module installed.

Upon trying to create a view:
"# Display "Page" uses fields but there are none defined for it or all are excluded.
# Display "Page" uses a path but the path is undefined."

I think I need to rtf(ine)m. What arguments do I give it? What query?

It looks to me like this is more for administrative purposes. I just want a page that shows content types (like on the create content page) but under each it shows the content that has been created. Seems like drupal would allready have this ability. Was it wrong to use "content types" be categories?

Create Content:
01. History
History and Approaches of Psychology
02. Methods
Research Methods: Experimental, Correlational, Statistics

View Content:
01. History
History and Approaches of Psychology
02. Methods
Research Methods: Experimental, Correlational, Statistics

_

WorldFallz - February 8, 2009 - 23:59

Views documentation is located at http://drupal.org/node/109604 and in the advanced help for the module itself your site. I found the advanced help indispensable.

===
"Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime." - Lao Tzu
"God helps those who help themselves." - Ben Franklin
"Search is your best friend." - Worldfallz

Listing/Viewing

websammy - February 9, 2009 - 00:55

I don't see anywhere I can view content by content type (pages, articles, etc. and the respective content within each type) Views only "allows you to fetch and present lists of content" what am I missing? I see "recent posts" and tracker... but what about a simple view by type option?

_

WorldFallz - February 9, 2009 - 01:06

what am I missing?

The 2nd link in views help describes how to create a view of "stories" content type.

===
"Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime." - Lao Tzu
"God helps those who help themselves." - Ben Franklin
"Search is your best friend." - Worldfallz

For as simple a need as

Keyz - February 9, 2009 - 01:59

For as simple a need as you've outlined, you may be able to start off with the SimpleViews module (which as it's name suggests, guides you in making simple views for Views module). Watch this for a good introduction: http://www.lullabot.com/blog/simpleviews-demo

-- David
davidnewkerk.com | absolutecross.com
View my Drupal lessons & guides

I'll go with this

websammy - February 9, 2009 - 23:11

Thanks, that looks like much easier. i didn't get the lingo in views2...

I would also say views is

NaX - February 9, 2009 - 12:17

I would also say views is the way to go. It should be easy to do with views 1 and 2.

Start by creating a view that just list all the content you want from all the different content types. Once you have done this you should have a page that lists everything, pages, stories, books. Once you have done this you need to edit your view to use arguments. You would use the node type argument. You would then use this argument in your links to filter your view to only show that type. EG. www.example.com/my_view/page or www.example.com/my_view/story

Learning to use views can take some time and views 2 is every more powerful but also more complex to learn.

Once you have done this you can create a page with all your links on it linking to your view or you can use some php to generate your list of links from the node types table. I don’t know views 2 very well but maybe you can create this list with views 2, but I might be wrong.

How do I mark as solved?

websammy - February 9, 2009 - 23:15

I've switched over to a forum. Create content, view content, comment on content. But I would much rather have it set up like a news site with articles (essays) sorted into categories for viewers who may also be submitters, who can also comment.

Forum module has fixed my problem thus far.

I have done something like

NaX - February 10, 2009 - 07:12

I have done something like this before and I used Views + CCK + Taxonomy.

Views combined with Arguments and Exposed filters.

If you battling to learn how views works I would suggest you do a Drupal 5 install and learn how views works using the D5 version. I found the D5 version a little easier to learn.

Once you have the basic concepts worked out then try the D6 version again. Things should make more sense then.

Also have a look at this module http://drupal.org/project/taxonomy_list
I used this module in conjunction with views to override the taxonomy page lists display.

Views 2

Keyz - February 10, 2009 - 07:48
 
 

Drupal is a registered trademark of Dries Buytaert.