Difference between revisions of "Cein drupal site"
From Stadm
Jump to navigationJump to search(9 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 23: | Line 27: | ||
<li>under the 'fields' category add all the content fields that you want to be displayed in the view</li> | <li>under the 'fields' category add all the content fields that you want to be displayed in the view</li> | ||
*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 '<br>' into the separator text area | *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 '<br>' into the separator text area | ||
− | <li>then under the 'page settings' category click on 'path' and add | + | <li>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)</li> |
+ | <li>under the 'advanced' category click on contextual filters and add a new one based on one of the previously made taxonomies</li> | ||
+ | <li>the new filter should appear under the contextual filters category so click on it and start editing</li> | ||
+ | <li>choose an appropriate value for when the filter is not provided an argument</li> | ||
+ | <li>under the section 'when a filter value is in the url' select 'specify validation criteria' and choose taxonomy term as the validator</li> | ||
+ | <li>a list of vocabularies should appear; click on the correct one for this view and then choose 'Term ID' as the filter value type</li> | ||
</ol> | </ol> | ||
+ | |||
==Quick Tabs== | ==Quick Tabs== | ||
Quick tabs is a module I found that works well for displaying blocks, views, nodes, etc. as tabbed content on a page. | 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: | ||
+ | <ol> | ||
+ | <li>create a new quick tabs instance</li> | ||
+ | <li>in each tab choose 'views' as the tab type</li> | ||
+ | <li>under 'tab content' there should now be an 'arguments' option; in here type the taxonomy term number you want to filter by</li> | ||
+ | *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 | ||
+ | <li>save the quick tabs instance and add it to a page by enabling it under 'structure/blocks'</li> | ||
+ | </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:
- add a new view and give it a name
- choose which type of content you want displayed in your view (in my case I chose content type=bio)
- 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
- 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 - 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)
- under the 'advanced' category click on contextual filters and add a new one based on one of the previously made taxonomies
- the new filter should appear under the contextual filters category so click on it and start editing
- choose an appropriate value for when the filter is not provided an argument
- under the section 'when a filter value is in the url' select 'specify validation criteria' and choose taxonomy term as the validator
- 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:
- create a new quick tabs instance
- in each tab choose 'views' as the tab type
- 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
- 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?)