Hello,
I need some help to understand the
Can it be used twice, like this:Or should I wrap the loop around the entire html like this:Final question. Does the amount of html inside the loop matter for performance?
I need some help to understand the
{% for something in loops.something %}xxx{% endfor %}
used in the templates.Can it be used twice, like this:
Code:
<div class="forabg" role="row"><div class="inner"><ul class="topiclist"><li class="header"><dl class="row-item"><dt><div class="list-inner">{% for randomjokes in loops.randomjokes %}{{ randomjokes.JOKES_NAME }}{% endfor %}</div></dt><dd></dd></dl></li></ul><div class="panel bg1"><div class="inner"><div class="content"><img style="float:right;margin-left:10px;" class="responsive-hide" src="{{ ROOT_PATH }}ext/stoker/randomjokes/images/randomjokes.png" width="69" height="50" alt="" /><img style="float:left;margin-right:10px;" class="responsive-hide" src="{{ ROOT_PATH }}ext/stoker/randomjokes/images/randomjokes.png" width="69" height="50" alt="" />{% for randomjokes in loops.randomjokes %}<p style="margin-bottom:0px;font-size:1.5em;">{{ randomjokes.JOKES_TEXT }}</p> {% endfor %}</div></div></div></div></div>
Code:
{% for randomjokes in loops.randomjokes %}<div class="forabg" role="row"><div class="inner"><ul class="topiclist"><li class="header"><dl class="row-item"><dt><div class="list-inner">{{ randomjokes.JOKES_NAME }}</div></dt><dd></dd></dl></li></ul><div class="panel bg1"><div class="inner"><div class="content"><img style="float:right;margin-left:10px;" class="responsive-hide" src="{{ ROOT_PATH }}ext/stoker/randomjokes/images/randomjokes.png" width="69" height="50" alt="" /><img style="float:left;margin-right:10px;" class="responsive-hide" src="{{ ROOT_PATH }}ext/stoker/randomjokes/images/randomjokes.png" width="69" height="50" alt="" /><p style="margin-bottom:0px;font-size:1.5em;">{{ randomjokes.JOKES_TEXT }}</p> </div></div></div></div></div>{% endfor %}
Statistics: Posted by Stoker 4.0 — Wed Apr 16, 2025 5:01 pm