獲取投票對象。
**實現類**
* com.jspxcms.ext.web.directive.VoteDirective
**參數**
* siteId:站點ID。多個用英文逗號分隔,如'1,2,5'。默認為當前站點,如果要獲取所有站點的數據,可以傳空字符串''。
* id:投票ID。
* number:投票編碼。
* status:狀態。默認:啟用狀態。
**范例**
獲取ID位20的投票對象:
~~~
[@Vote id='20';vote]
[#if vote??]
<a href="${dy}/vote?id=${vote.id}">${vote.title?html}</a>
<form action="${ctx}/vote.jspx" method="post" id="vote">
<input type="hidden" name="id" value="${vote.id}"/>
[#list vote.options as option]
<input type="radio" name="optionIds" value="${option.id}"/>${option.title}
[/#list]
<input type="hidden" name="status_560" value="您已經投過票了"/>
<input type="hidden" name="redirectUrl" value="${ctx}/vote/{id}"/>
<input type="submit" value="投票"/>
<a href="${dy}/vote/${vote.id}">查看結果</a>
</form>
[#else]
<p>沒有投票</p>
[/#if]
[/@Vote]
~~~
- 標簽基本知識
- InfoList與InfoPage標簽
- NodeList標簽
- NodeList與NodePage標簽
- InfoFulltextList與InfoFulltextPage標簽
- SpecialCategoryList標簽
- SpecialList與SpecialPage標簽
- TagList與TagPage標簽
- CommentList與CommentPage標簽
- FriendlinkTypeList標簽
- GuestbookTypeList標簽
- GuestbookList和GuestbookPage標簽
- Node標簽
- Info標簽
- InfoPrev標簽
- InfoNext標簽
- Vote標簽
- 標簽通用參數
- A標簽
- QuestionList與QuestionPage標簽
- Question標簽
- Query標簽