Difference between revisions of "Cein drupal site"

From Stadm
Jump to navigationJump to search
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
[[Category:Projects]]
 +
 
==Overview==
 
==Overview==
 
This page is most of the documentation on what I've done with the cein drupal page so far. Most of the work I have done was with the personnel pages of the site.
 
This page is most of the documentation on what I've done with the cein drupal page so far. Most of the work I have done was with the personnel pages of the site.
 +
The instructions here are one way to display filtered views through quick tabs, which eliminates the need to create multiple views of similar content.
  
 
The main things I have added/changed are:
 
The main things I have added/changed are:
Line 11: Line 14:
 
*keep in mind the taxonomy term number which should be in the url after /taxonomy/term/
 
*keep in mind the taxonomy term number which should be in the url after /taxonomy/term/
 
*the taxonomies are very important in order to relate the different content to one another
 
*the taxonomies are very important in order to relate the different content to one another
 +
  
 
==Views==
 
==Views==
Line 43: Line 47:
 
<li>save the quick tabs instance and add it to a page by enabling it under 'structure/blocks'</li>
 
<li>save the quick tabs instance and add it to a page by enabling it under 'structure/blocks'</li>
 
</ol>
 
</ol>
 +
 +
 +
===QT config===
 +
config info here
 +
 +
==Stuff To Do==
 +
*find a way to add group leader taxonomy and for that to have a specific entry in content type
 +
*try to get image block in sidepanel to do the same thing as the views
 +
*look into trying to use one views for both people and research page
 +
**will have to get it to somehow display different fields from the same views based on contextual filters (possible?)

Latest revision as of 09:26, 6 September 2012


Overview

This page is most of the documentation on what I've done with the cein drupal page so far. Most of the work I have done was with the personnel pages of the site. The instructions here are one way to display filtered views through quick tabs, which eliminates the need to create multiple views of similar content.

The main things I have added/changed are:

  • taxonomies to apply to the appropriate content types (mainly bio)
  • worked with quick tabs and views arguments in order to display a views with certain filter criteria per tab

Taxonomies

  • I added a couple vocabularies to apply to the different types of bio content that would be entered in
  • under each term I then added the necessary terms to further distinguish each content
  • keep in mind the taxonomy term number which should be in the url after /taxonomy/term/
  • the taxonomies are very important in order to relate the different content to one another


Views

Views is a popular drupal module that I used to display lists of similar content, like on the various personnel pages

To create a new view:

  1. add a new view and give it a name
  2. choose which type of content you want displayed in your view (in my case I chose content type=bio)
  3. create a page giving it an appropriate url
    • there are several different kinds of display formats available to views; I chose to use a table to display the content
  4. under the 'fields' category add all the content fields that you want to be displayed in the view
    • in order to group fields together into one column you need to go to the 'format' category and click on the table settings. From there you choose which fields you want grouped together and set their 'column' value to the same field. Then type '
      ' into the separator text area
  5. then under the 'page settings' category click on 'path' and add '/%' to the end of the url you made earlier (this step is very important for displaying the same views in different tabs with different content)
  6. under the 'advanced' category click on contextual filters and add a new one based on one of the previously made taxonomies
  7. the new filter should appear under the contextual filters category so click on it and start editing
  8. choose an appropriate value for when the filter is not provided an argument
  9. under the section 'when a filter value is in the url' select 'specify validation criteria' and choose taxonomy term as the validator
  10. a list of vocabularies should appear; click on the correct one for this view and then choose 'Term ID' as the filter value type


Quick Tabs

Quick tabs is a module I found that works well for displaying blocks, views, nodes, etc. as tabbed content on a page.

To add the previously made views to quick tabs:

  1. create a new quick tabs instance
  2. in each tab choose 'views' as the tab type
  3. under 'tab content' there should now be an 'arguments' option; in here type the taxonomy term number you want to filter by
    • for example: if I had previously created a taxonomy called colors and I wanted to display all content that was blue in the first tab and green in the second tab, you would type the term number into the tab argument so that when its displayed views will see the number in the url and display content based on the contextual filter that was previously provided
  4. save the quick tabs instance and add it to a page by enabling it under 'structure/blocks'


QT config

config info here

Stuff To Do

  • find a way to add group leader taxonomy and for that to have a specific entry in content type
  • try to get image block in sidepanel to do the same thing as the views
  • look into trying to use one views for both people and research page
    • will have to get it to somehow display different fields from the same views based on contextual filters (possible?)