LoadedGun
we shoud have a small tag or code to show number of joined users anywhere in our site.
SupAlpuket
.
I want read xtscript variable in xtforum's twig, since xtscript parsed first
maybe
@XtScript
var $name = value
@xtforum.twig
{% if name %}
hello {{name}}
{% endif %}
use 'name' only or namespaced instead, like 'xtvar_name'
Copy code
it may usefull play with cookie, get-post variable, etc
please add it,
Graham
SupAlpuket It will not work for the forum as it is parsed after the xtscript and is not parsed in the xtscript
It will however vaguely work on the blog as that is parsed before and during xtscript
SupAlpuket
Graham .
Maybe, you haven't understand,
Yes, XtScript Code Parsed First
as we know, that can outputed at outer xtscript
like {_$$name|}
and why not try pass that '$name' to internal twig API
and we can do something
{% if name %}
hello {{name}}
{% endif %}
Copy code
use 'name' only or namespaced instead, like 'xtvar_name'
.
i hope you understand now
Graham
SupAlpuket I have already tested the use of xtscript variables in the forums twig file and they do not work
nor can they ever work the parsing order is completely wrong
SupAlpuket
Graham i am still curious with your test
does it use something such this
<?php
//XtScript first
$xtscript = new script();
// here processing page with any xtscript.
// $xtforum_vars and $xtscript->vars should merged here
$twig = new Twig_Environment(...);
echo $twig->render($xtscript_output, $xtforum_vars);
Copy code
SupAlpuket
update to my question, mr. graham/povilas please
SupAlpuket
add param "page" <xt:forum page="forum.mysite.xtgem.com"> let links deal with subdomain system or domain parking