I am trying to have a loop in a mail template but for some reason I have some unwanted results...
What I mean?
Well first of all I generate 2 arrays that look like this...
Code: Select all
/srv/http/newnew/ext/andreask/ium/classes/reminder.php:115:
array (size=2)
1 =>
array (size=2)
'title' => string 'Κεντρικό topic ευχών' (length=33)
'url' => string 'http://new.local/viewtopic.php?f=94?&t=182' (length=42)
2 =>
array (size=2)
'title' => string 'Σούπα' (length=10)
'url' => string 'http://new.local/viewtopic.php?f=61?&t=365' (length=42)
/srv/http/newnew/ext/andreask/ium/classes/reminder.php:126:
array (size=5)
0 =>
array (size=2)
'title' => string 'Σούπα' (length=10)
'url' => string 'http://new.local/viewtopic.php?f=61?&t=365' (length=42)
1 =>
array (size=2)
'title' => string 'Κεντρικό topic ευχών' (length=33)
'url' => string 'http://new.local/viewtopic.php?f=94?&t=182' (length=42)
2 =>
array (size=2)
'title' => string 'Τι πήρα - ήρθε σήμερα [13]' (length=42)
'url' => string 'http://new.local/viewtopic.php?f=61?&t=5895' (length=43)
3 =>
array (size=2)
'title' => string 'Τι πήρα - ήρθε σήμερα [14]' (length=42)
'url' => string 'http://new.local/viewtopic.php?f=61?&t=6318' (length=43)
4 =>
array (size=2)
'title' => string 'Το ξύρισμα της ημέρας : Μάρτιος 2018' (length=61)
'url' => string 'http://new.local/viewtopic.php?f=113?&t=6031' (length=44)
$messenger->assign_block_vars('USR_TPC_LIST', $topic_links);
and
$messenger->assign_block_vars('USR_FRM_LIST', $forum_links);
Both arrays have different data in them.
Then on the email template I have this "contraction"...
Code: Select all
<!-- IF USR_TPC_LIST -->
Below some links to topics that you've been active.
<!-- BEGIN USR_TPC_LIST -->
{% for user_topics in USR_TPC_LIST %}
"{{ user_topics.title }}"
{{ user_topics.url }}
{% endfor %}
<!-- END USR_TPC_LIST -->
<!-- ENDIF -->
<!-- IF USR_FRM_LIST -->
Below some links to the most active topics of the board.
<!-- BEGIN USR_FRM_LIST -->
{% for forum_topics in USR_FRM_LIST %}
"{{ forum_topics.title }}"
{{ forum_topics.url }}
{% endfor %}
<!-- END USR_FRM_LIST -->
Could you please point me to the mistake I am making?
Code: Select all
Below some links to topics that you've been active.
"Κεντρικό topic ευχών"
http://new.local/viewtopic.php?f=94?&t=182
"Σούπα"
http://new.local/viewtopic.php?f=61?&t=365
""
""
""
""
""
""
Below some links to the most active topics of the board.
"Σούπα"
http://new.local/viewtopic.php?f=61?&t=365
"Κεντρικό topic ευχών"
http://new.local/viewtopic.php?f=94?&t=182
"Τι πήρα - ήρθε σήμερα [13]"
http://new.local/viewtopic.php?f=61?&t=5895
"Τι πήρα - ήρθε σήμερα [14]"
http://new.local/viewtopic.php?f=61?&t=6318
"Το ξύρισμα της ημέρας : Μάρτιος 2018"
http://new.local/viewtopic.php?f=113?&t=6031
""
""
""
""
""
""
<!-- BEGIN -->
tag. But when I remove it then the loop does not work at all.You can see the complete code for the php script in github here.
And the email template is here
Thank you for your help!