abdfahim
Well-known member
Hi,
I am trying to learn XF, so my apology if the question is too basic.
I am trying to understand how the poll block works. So, I was looking at poll_block template and realized the following line is adding the poll body (results/options).
Then I figured out, most probably, the variable $options is being set up in following two templates
thread_poll_results:
thread_poll_vote:
What I don't understand is, however, how this templates are being chosen. I can't see any related if block in poll_block template which would load $options from
I am trying to learn XF, so my apology if the question is too basic.
I am trying to understand how the poll block works. So, I was looking at poll_block template and realized the following line is adding the poll body (results/options).
Code:
{xen:raw $options}
Then I figured out, most probably, the variable $options is being set up in following two templates
thread_poll_results:
Code:
<xen:include template="poll_block">
<xen:set var="$options">
<xen:include template="poll_block_result" />
</xen:set>
</xen:include>
thread_poll_vote:
Code:
<xen:include template="poll_block">
<xen:set var="$options">
<xen:include template="poll_block_vote" />
</xen:set>
</xen:include>
What I don't understand is, however, how this templates are being chosen. I can't see any related if block in poll_block template which would load $options from
- thread_poll_results if the user has voted
- thread_poll_vote if the user has not voted