-
Notifications
You must be signed in to change notification settings - Fork 19
/
README
executable file
·61 lines (40 loc) · 2.01 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
--------------------
Polls
--------------------
Version: 1.1-rc1
Since: December 21th, 2010
Author: Bert Oost <[email protected]>
A simple Poll solution for MODx Revolution. Create questions
and answers for it and add them into poll-categories.
The first release is very basic for what a poll can be but
feel free to suggest ideas/improvements/bugs on the github.
Please see the GIT project: https://github.com/bertoost/MODx-Polls
And the official docs at http://rtfm.modx.com/display/ADDON/Polls
EXAMPLE USAGE
--------------------
You can create categories to link your polls too. This feature is
for sites wich have multiple polls needed on different pages. For
a simple usage, it's not necessary.
On the page you want to view the poll, just paste the snippet call
in your template or resource content, like this:
[[!PollsLatest]]
TEMPLATES:
tplVote - The main form template for the latest poll view
tplVoteAnswer - The form template for the answers inside the main view
tplResult - The main result template for the latest poll view
tplResultAnswer - The result template for the answers inside the outer view
SELECTION:
category - (Opt) will select the latest poll from the given category (id), could be multiple devided by a comma
sortby - (Opt) to influence the normal order, order could be any field in list, defaults to id
sortdir - (Opt) to influence the normal order direction, defaults to DESC
[Note] No params; will select the latest poll from any category
sortby and sortdir are normally not need to set
LINKING:
resultResource - (Opt) when set to a resource id, this resource will be used to show the poll results
resultLinkVar - (Opt) when using resultResource, this is the paramatername the snippet is looking for
[[!PollsResult]]
TEMPLATES:
tpl - The main result template for the poll view
tplAnswer - The result template for the answers inside the outer view
LINKING:
resultLinkVar - (Opt) when using resultResource, this is the paramatername the snippet is looking for