Graham
tiaxgame No that will not work for lots of reasons
What are you trying to do ?
tiaxgame
Graham in "view_thread.js'
{% set d %}{{ block('thread') }}
{% endset %}{% set d %}{{ d|striptags|replace({(thread.title): ""})|split(' ') }}{% endset %}{{ 'total comment: 'd[0] }}
Copy code
I can't fix it! It isn't action
Graham
tiaxgame Your example made no sense
{% set c='tiax test'|split(' ') %}
{{ c[1] }}
Copy code
returns "test"
tiaxgame
Graham thank! Else "split"
I can't used "array"
Ex: #23
I want output = "test" =>{{ c[1] }}
But! It's not action !
Graham
tiaxgame First one
{% set a="tiax" %}
{% set b="tiaxtest" %}
{{ b|replace({(a) : ""}) }}
Copy code
To use a variable it must be enclosed in ( ) as if it was an expression
you were also missing a set of { }
tiaxgame
Graham And:
{% set c|split(' ') %}tiax test{% endset %}
{{ c[1] }}
Output "test" !?
tiaxgame
Graham {% set a="tiax" %}
{% set b="tiaxtest" %}
{{ b|replace(a: "") }}
I want output = "test", but "replace not action! Why!?