* dead please tell me why I can not use .. in TWIG
2014-04-21 17:28 · (0)
* Graham * dead without the context I do not have a clue .
I just tested outputting a image using ../images/image.png as the src in my twig file and it worked fine
2014-04-21 18:24 (edited 2014-04-21 18:33 by Graham ) · (1)
* tiaxgame * Graham i want split my file.twig
Ex: file.twig
include a1.twig
include a2.twig

???
2014-04-22 02:30 · (0)
* Graham * tiaxgame Yes you can by using {% include 'subfolder/filename.anything' %}
and If you want you can split it into multiple parts
1/ all files have to be in _xtgem_templates or sub folders of it
2/ care must be taken to split the files in the right place to preserve the context
for example I just tested by splitting out the macro that outputs the guest book entries I had to include the line under the macro that calls it in the split
3/ keep a copy of the original incase of errors
2014-04-22 08:45 · (0)
* tiaxgame * Graham ok! Thank
2014-04-22 09:06 · (0)
* dead * Graham i can't use api.r.get("xx")
2014-04-22 12:44 · (0)
* Graham * dead You can only use the parts of twig that are relevant to templates not the developer stuff that creates the templates
The use of twig on xtgem is limited to the templates for blog guestbook and forum
2014-04-22 13:05 (edited 2014-04-22 13:19 by Graham ) · (0)
* dead * Graham oh, thanks
2014-04-22 17:00 · (0)
* tiaxgame * Graham Is file.anything ?
{% include '_xtgem_templates/file.anything' %}
But it isn't action :(
2014-04-23 00:49 (edited 2014-04-23 00:50 by tiaxgame ) · (0)
* Graham * tiaxgame _xtgem_templates is not required in the path it is pre-configured and fixed
you only need to add a folder if it is a sub folder of _xtgem_templates
ie:
if the file is _xtgem_templates/macros/macro_1.twig
You would use {% include 'macros/macro_1.twig' %}

if the file is _xtgem_templates/macro_1.twig
you just use{% include 'macro_1.twig' %}
2014-04-23 02:36 (edited 2014-04-23 02:41 by Graham ) · (0)

Online: Guests: 1