Template:Wmdgs-simplesurveyquestion-2

  1. if: |}}</includeonly>

This template creates a survey question, allowing for 2 answers (such as a yes or no question). The image in the response box will be the same for each answer (if you want different images for each answer, see instructions on {{Wmdgs-makesurveyquestion-2}}.

UsageEdit

{{subst:Wmdgs-simplesurveyquestion-2|
| question = 
| topic link = 
| Image = 
| response 1 = 
| showtext 1 = 
| category 1 = 

| response 2 = 
| showtext 2 = 
| category 2 = 
}}

First, copy the text above and add it to the template page, then fill in as follows:

  • question = enter the question as you want it to appear on the template
  • topic link = this defines what page the "(discuss)" link will lead to. It automatically adds "[[Wikimedian Demographics/" to the beginning of the link.
  • Image = add the filename of the image you'd like to use, not including the "Image:" prefix. The template automatically sets the size.
  • response 1 = this is what you want the first valid response to be (for example, just enter a "y" if it's a yes or no question)
  • showtext 1 = this will show the text. For example, "{{BASEPAGENAME}} likes dogs" (the {{BASEPAGENAME}} will be translated by the template to show the user's name).
  • category 1 = Add the name of the category (without the survey prefix) that you want the template to add. For example "Likes dogs" will add [[WMDGS/Likes dogs]]

Now do the same for response 2, adding the appropriate text and category.

You can use this template repeatedly on the same page to make a set of questions and responses in order to create a complete template. When you've added all the questions, cut and paste the questions to the bottom within "pre" tags.

ExampleEdit

{{subst:Wmdgs-simplesurveyquestion-2|
| question = Do you like dogs (y/n)?
| topic link = Pets
| Image = Image:Beauceron_portrait.jpg
| response 1 = y
| showtext 1 = {{BASEPAGENAME}} likes dogs.
| category 1 = Likes dogs

| response 2 = n
| showtext 2 = {{BASEPAGENAME}} does not like dogs.
| category 2 = Dislikes dogs
}}

Related pagesEdit