Template:Course Filter

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





Using the Course Filter Template
This template is for use on pages where it is necessary to display content for either 221A or 221B/C. This is usually for content involving Excel and SPSS, but there may be other uses as well. (For instructions on displaying Excel and SPSS instructions, see Template:Software_Filter.) 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 Course_Filter_Two template instead.



The base code looks like this:
<div class="stats {{{course}}} filter-div">{{{content}}}</div>
On the page where the content will be displayed, the following code will be input:
{{Course_Filter|course=B C|content=Click here for instructions for SPSS}}
B and C specify the courses that the content will be displayed on. The sentence following the Content= is what is displayed when the course is set to 221B or 221C. If you want content to appear only for 221A courses, you would input:
{{Course_Filter|course=A|content=Click here for instructions for Excel}}


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




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



Example:
The following code will display only the correct content depending on which course is selected at the top of the page.
What you input:
{{Course_Filter|course=A|content=This will only appear when 221A is selected at the top of the screen.}}{{Course_Filter|course=B C|content=This will only appear when 221B or 221C is selected at the top of the screen.}}
What you get out:
This will only appear when 221A is selected at the top of the screen.
This will only appear when 221B or 221C is selected at the top of the screen.


It is possible to use this template to display content for only 221B or 221C.