|
| 1 | +{% import '@vse_topicpreview/topicpreview_macro.html' as macro %} |
| 2 | + |
1 | 3 | {# display topic preview in view forum #}
|
2 |
| -{% if topicrow.TOPIC_PREVIEW_FIRST_POST %} |
3 |
| - {% set preview = topicrow %} |
4 |
| - {% include '@vse_topicpreview/topicpreview.html' %} |
5 |
| -{% endif %} |
| 4 | +{{ macro.renderTopicPreview(topicrow) }} |
6 | 5 |
|
7 | 6 | {# display topic preview in search results #}
|
8 |
| -{% if searchresults.TOPIC_PREVIEW_FIRST_POST %} |
9 |
| - {% set preview = searchresults %} |
10 |
| - {% include '@vse_topicpreview/topicpreview.html' %} |
11 |
| -{% endif %} |
| 7 | +{{ macro.renderTopicPreview(searchresults) }} |
12 | 8 |
|
13 | 9 | {# display topic preview in Similar Topics extension #}
|
14 |
| -{% if similar.TOPIC_PREVIEW_FIRST_POST %} |
15 |
| - {% set preview = similar %} |
16 |
| - {% include '@vse_topicpreview/topicpreview.html' %} |
17 |
| -{% endif %} |
| 10 | +{{ macro.renderTopicPreview(similar) }} |
18 | 11 |
|
19 | 12 | {# display topic preview in Recent Topics extension #}
|
20 |
| -{% if recent_topics.TOPIC_PREVIEW_FIRST_POST %} |
21 |
| - {% set preview = recent_topics %} |
22 |
| - {% include '@vse_topicpreview/topicpreview.html' %} |
23 |
| -{% endif %} |
| 13 | +{{ macro.renderTopicPreview(recent_topics) }} |
24 | 14 |
|
25 | 15 | {# DEPRECTATED: @v2.2.1 display topic preview in Top Five extension #}
|
26 |
| -{% if top_five_topic.TOPIC_PREVIEW_FIRST_POST %} |
27 |
| - {% set preview = top_five_topic %} |
28 |
| - {% include '@vse_topicpreview/topicpreview.html' %} |
29 |
| -{% endif %} |
| 16 | +{{ macro.renderTopicPreview(top_five_topic) }} |
0 commit comments