* Ekonime how can i make this work
{% use "my_blocks.twig" %}

{# Used in post_view block #}
{% macro rate( rate_value, karma, post_id  ) %}document.getElementById('ajax').src=this.href+'&__ajax=1';document.getElementById('r{{ post_id }}').innerHTML='({{ ( karma + rate_value ) }})';{{ ( karma - rate_value ) }} > 0 ? document.getElementById('r{{ post_id }}').style.color='#b20016' : {{ ( karma - rate_value ) }} < 0 ? document.getElementById('r{{ post_id }}').style.color='#86C219' : null;document.getElementById('rd{{ post_id }}').style.display='none';document.getElementById('ru{{ post_id }}').style.display='none';return false;{% endmacro %}

{% if __view == '404' %}
{%include 'forum/404.js'%}
 {% elseif __view == 'categories' %}
{%include 'forum/categories.js'%}
{% elseif __view == 'board' %}
{% include 'forum/boards.js'%}
{% elseif __view == 'thread' %}
{% include 'forum/threads.js'%}
{% elseif __view == 'confirm' %}
{% include 'forum/confirm.js'%}
{% elseif __view == 'edit_post' %}
{% include 'forum/edit_post.js'%}
{% elseif __view == 'edit_thread' %}
{% include 'forum/edit_thread.js'%}
{% elseif __view == 'message' %}
{% include 'forum/message.js'%}
{% elseif __view == 'modlog' %}
{% include 'forum/modlogs.js'%}
{% elseif __view == 'post' %}
{% include 'forum/post.js'%}
{% elseif __view == 'options' %}
{% include 'forum/options.js'%}
{% elseif __view == 'redirect' %}
{% include 'forum/redirect.js'%}
{% elseif __view == 'new_thread' %}
{% include 'forum/new_threads.js'%}
{% elseif __view == 'search' %}
{% include 'forum/search.js'%}
{% elseif __view == 'invite' %}
{% include 'forum/invite.js'%}
{% elseif __view == 'join' %}
{% include 'forum/join.js'%}
{% endif %}

Copy code
see my site ekonime.yn.lt/forum
2017-01-10 13:42 · (0)
* Ekonime if i use include.. my block does not work, i dont know why
2017-01-10 13:51 · (0)
* Graham * Ekonime Your blocks in the 'forum' folder also need {% use "my_blocks.twig" %} at the top if they 'use' blocks defined in that template
ie {{block('online')}} etc
2017-01-11 03:46 (edited 2017-01-11 03:55 by Graham ) · (0)
* Ekonime * Graham does not work sir maybe work only in single file.. see my file
2017-01-11 05:10 · (0)
* Ekonime * Graham does not work sir maybe work only in single file.. see my file
2017-01-11 05:11 · (0)
* Graham * Ekonime I just looked you have not added it to the files in the _xtgem_templates/forum folder
Split forum twigs do work I have one somewhere I just can't find it right now
2017-01-11 08:04 (edited 2017-01-11 08:19 by Graham ) · (0)
* Ekonime * Graham no solution for this?
2017-01-14 01:16 · (0)
* Graham * Ekonime I already told you what a major part of the problem is {% use "my_blocks.twig" %} is required in the files that call other blocks that are defined in my_blocks.twig
it's not optional it's required
2017-01-14 03:40 (edited 2017-01-14 03:42 by Graham ) · (0)
* Ekonime * Graham i have already add but still not work
2017-01-14 03:54 · (0)
* Graham * Ekonime I just looked the files in your _xtgem_templates/forum folder do not have the {% use "my_blocks.twig" %} no matter what other errors there may be it is still required
2017-01-14 04:29 (edited 2017-01-14 04:30 by Graham ) · (0)

Online: Guests: 1