* Graham * Mwebvendor it turns out to be surprisingly easy
If your blog is assigned to a xtscript variable and then printed
You can add xt:widgets and xt:functions directly into the twig as xtscript changes the parsing order
this code goes in {% block entries_list %} somewhere inside the '{% for entry in data.entries %} loop to display the counters without updating them
{%set xtcat=entry.url|split('__xtblog_entry/')%}
{%set xtcat=xtcat[1]|split('?')%}
<span class="xt_button"><xt:widget tool="Counter" site="SITE" type="display1" idstring="{{xtcat[0]}}"  key="XTCAT KEY" xtuser="XTCAT USER" id="xt.c.a.t." /></span>

Copy code

This code goes somewhere in {% block entry_post %} to display the count and update it
{%set xtcat=data.post.url|split('__xtblog_entry/')%}
{%set xtcat=xtcat[1]|split('?')%}
<span class="xt_button"><xt:widget tool="Counter" site="SITE" idstring="{{xtcat[0]}}"  key="XTCAT KEY" xtuser="XTCAT USER" id="xt.c.a.t." /></span>

Copy code

demo http://adgj.mw.lt/blog_0
In the demo I also used a gradient text widget to display the post titles
so the same method should work for other widgets
I dont think it will work in forum as that is not available to xtscript
Remember to set your own site user and key in the above code and it will only work via xtscript

Use this trick to set the blog so you can still use it in the building tool
# </xt:code>
var $blog=<xt:blog tzone="0" format="Y-m-d" display="1" show_time="0" entries_per_page="10" comments_per_page="20" comments_sort="-1" entries_sort="-1" display_limit="0" display_symbol="" version="2" t_back_to_posts="" t_comments="" t_comments_empty="" t_post_a_comment="" t_name="" t_comment="" t_post="" t_tags="" t_search="" t_created="" t_showing_tagged_posts="" t_no_entries_found="" t_no_search_results_found="" t_show_all_comments="" t_see_parent_thread="" t_show_all_replies="" t_show_replies="" t_reply="" t_posting_as="" t_comments_login_required="" t_login="" t_signup="" t_confirm_email="" t_report_spam="" />
# <xt:code>
print $blog

Copy code
2016-05-14 00:40 (edited 2016-05-14 09:10 by Graham ) · (0)

Online: Guests: 1