---
myst:
html_meta:
"description": ""
"property=og:description": ""
"property=og:title": ""
"keywords": ""
---
(plone5-viewlets2-label)=
# A Viewlet for the Votable Behavior
(plone5-viewlets2-voting-label)=
## Voting Viewlet
In this part you will:
- Write the viewlet template
- Add jQuery include statements
- Saving the vote on the object using annotations
Topics covered:
- Viewlets
- JavaScript inclusion
```{only} not presentation
Earlier we added the logic that saves votes on the objects. We now create the user interface for it.
Since we want to use the UI on more than one page (not only the talk view but also the talk listing) we need to put it somewhere.
- To handle the user input we don't use a form but links and ajax.
- The voting itself is a fact handled by another view
```
We are working in the add-on {file}`starzel.votable_behavior` we created using mr.bob.
We register the viewlet in {file}`browser/configure.zcml`.
```{code-block} xml
:emphasize-lines: 6-14
:linenos: