From Gramps
Jump to: navigation, search

adding a poll to your article

Add it centrally

To get more people to vote, add your poll to User polls. This has the advantage a casual visitor can glance several polls, and vote for more than one at the same time, making the data you collect more valuable


Adding a poll is actually enormously simple. Just add:

<poll domain=intl>
 Answer 1
 Answer 2
 Answer 3

You can add as many answers as you like. Some things to keep in mind though: the key of the poll is the Question, change the Question, even one letter, and you have a new poll! So check carefully the question if it's ok before saving.

That's it?

Actually, you best add to User polls a bit of context to your poll, with also a link to the page you use the poll on.

How to include a poll

To include the poll in an article, you use inclusion. You denote the poll on User polls with a section:

<section begin=pollkey /> ... here comes the poll ...
 <section end=pollkey />

Where you chose something meaningfull for pollkey.

You can then include everything denoted by the section in another page, with for example:

 <div style="width:100%" valign="top">
 {{#lst:User polls|pollkey}}


Note: apparently including the poll also includes a whitespace before the poll box. I am not aware of a method to disable this.