1

How do I make a View for the Article nodes that are created through the standard Article content type in Drupal 7?

I feel like I should make a Page View, but then it's wanting a URL, which should already exist from the Article node. I'm not sure how to properly hook it all together with Views

1

Views comes with a default view that emulates the Drupal core frontpage. Just enable it and specify a path (e.g. /articles). This URL has nothing to do with each nodes URL, this is just the URL of the page view where to access the "list" of most recent articles.

6
  • I'm almost there. How do I get article pages to use this View by default? – Ben Oct 25 '11 at 16:49
  • Views is not for laying out the node, it is for collecting lists of nodes, with say teasers that link to their node pages (i.e. the complete article) and creating a block or page with those lists. – user842 Oct 25 '11 at 17:17
  • user node/% and create a contextual filter nid using the argument. % stands for the argument. see example of taxonomy/termn/% – anonym-developer Oct 25 '11 at 17:17
  • @anonym-developer - I don't get it. :( I think I'm going to need step by step instructions if you can bear the time. – Ben Oct 25 '11 at 18:08
  • @nicoz - I'm not trying to strictly "Layout" the resulting article, but rather change what's displayed in what order. I can successfully to show. I want to alter the order and format of what's displayed by default by the Article Content type. – Ben Oct 25 '11 at 18:11
2

I suspect you are struggling with the same concepts I have wrestled with as I have started using Drupal in the past couple months.

I was under the impression that a view took over the display of some content and substituted itself for the original. Every item has a path including a view. If you want to have a view display an article or group of articles, you give it a path and tell it what you want through the filters display settings and sorting options. You can also pass information through the path by making part of the path a variable eg. example.com/my_stuff/%. You would then provide subcategories of 'my_stuff' to replace the % in the URL. By setting up a contextual filter in the view, you tell it how to interpret the information in the path in the variable position. Getting all parts of the context filter settings correct will take a little time and the video series "taming the Beast' at nodeone.se helps a great deal.

There is also a module called page manager/panels that will intercept the path you enter in the URL and take control of its display. If your article had a path of my_stuff/my_article, you could set up a panel to intercept that URL and do almost anything you want including re-routing to another page display, controlling the manner it is displayed and what else is added n blocks on that page display, or even send information about the article to a view that is not available from with Views to generate a more refined view result. Panels is not necessary to begin, but after you master views, you may be interested in how Panels enhances View capabilities and webpage design.

I struggled with several misconceptions as I started out and there is little info to help, so feel free to ask for clarifications. I'd be happy to help.

2
  • Thanks Joe. How about this one: drupal.stackexchange.com/q/14104/3276 – Ben Oct 25 '11 at 20:44
  • I am just now getting into the php end of DRupal, so I cannot answer off the top of my head. However, I am interested in exploring and discussion. – Ashlar Oct 25 '11 at 23:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.