Template:Type Filter

From BYU-I Statistics Text
Jump to: navigation, search
{{{content}}}





Using the Type Filter Template
This template is for use on pages where it is necessary to display content for only the Online or Classroom course types. In order for the correct content to be displayed, certain parameters must be set. There are 2 parameters for this template, and both are named.


If you want to center your content, be sure to use the Type_Filter_Two template instead.



The base code looks like this:
<div class="stats {{{type}}} filter-div">{{{content}}}</div>
On the page where the content will be displayed, the following code will be input:
{{Type_Filter|type=Online|content=Visible only to online students}}
Online specifies the course type that must be selected for the content to be displayed. The sentence following the Content= is what is displayed when the Course type is set to Online. If you want content to appear only for the Classroom course type, you would input:
{{Type_Filter|type=Classroom|content=Visible only to classroom students}}


In addition to simple text, you can also include links and transclude templates using this filter.




For content that is to appear in all course types, do not use this filter.



Example:
The following code will display only the correct content depending on which course type is selected at the top of the page.
What you input:
{{Type_Filter|type=Online|content=This will only appear when Online is selected at the top of the screen.}}{{Type_Filter|type=Classroom|content=This will only appear when Classroom is selected at the top of the screen.}}
What you get out:
This will only appear when Online is selected at the top of the screen.
This will only appear when Classroom is selected at the top of the screen.