Drupal Views
What's views?
- The Views module, in core since Drupal 8, allows you to query your site’s database,
- and present it to the user as lists, posts, galleries, tables, maps, graphs, menu items, blocks, reports, forum posts, webfeeds, JSON text files etc.
- In other words, it provides a graphical interface to a SQL query builder that can access virtually any information in your database and display it in any format.
- Basically views are lists. Lists of nodes or fields (contenttype fields)
- They come in page or block format,
- and the module can be extended in (many, many) various ways. For instance with the module I added to your default groupsite.
Some example views
- http://en.pedalion.org - The most basic view, only clickable titles.
- http://mdrn.be
- the homepage has four different views in its content area (in block format): slideshow; a newsblock with a date field, title and teaser; featured projects with a title and long teaser and a 'selected publications' block with a graphic element
- the people, projects, publications and studio pages each also house different views
- http://lukvanhaute.com/boek bloggish book-list with title, cover, teaser and read more link
- http://informatiewijzer.be/module/omgaan_met_data.html - accordeon views
Creating a view
As with content types a number of views come out-of-the-box, enabled by default. But most of the time you will make your own. This is actually the second phase in you web-building workflow, after building and populating the content types for your site.
- views live under 'admin/structure/views'
- take a look at some of the default (enabled) views
- content
- frontpage
- taxonomy term
- you start making a custom view with the 'add-view' form
- this wikiHow page shows the basic steps
- when you get the option to create either a page or a block, I usually go for block
Adding css to a view
- Adding (w3.)css to a view is almost identical to the procedure we used for content types. The functionality of adding w3.css classes to a view is provided by a neat little module, Field Formatter Class.
- w3.css classes in views Youtube tutorial
- mind that you can only style a view with fields
- adding w3.css classes to a field's style settings
- uncheck 'add default styles'
- customize field html
- create css class