- Posts: 2
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
How to set the values of variables defined in Twig templates
- bjtilley
- Topic Author
- Offline
- New Member
Less
More
3 weeks 4 days ago - 3 weeks 4 days ago #259821
by bjtilley
How to set the values of variables defined in Twig templates was created by bjtilley
Please help us help you and fill where relevant:
Your LimeSurvey version: LimeSurvey Community Edition Version 6.4.5+240205
Own server or LimeSurvey hosting: Yes
Survey theme/template: Vanilla register_message.twig
==================
I need to know how to set certain variables in found in the twig template.
For example register_message.twig has the following variables:
{{ aSurveyInfo.attr.registermessagea }}
{{ aSurveyInfo.attr.registermessageb }}
Do I set these values in the LimeSurvey admin backend?
Your LimeSurvey version: LimeSurvey Community Edition Version 6.4.5+240205
Own server or LimeSurvey hosting: Yes
Survey theme/template: Vanilla register_message.twig
==================
I need to know how to set certain variables in found in the twig template.
For example register_message.twig has the following variables:
{{ aSurveyInfo.attr.registermessagea }}
{{ aSurveyInfo.attr.registermessageb }}
Do I set these values in the LimeSurvey admin backend?
Last edit: 3 weeks 4 days ago by bjtilley.
Please Log in to join the conversation.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10110
- Thank you received: 3594
3 weeks 4 days ago #259825
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic How to set the values of variables defined in Twig templates
I believe those are from the locale translation files.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: DenisChenu
Please Log in to join the conversation.
- bjtilley
- Topic Author
- Offline
- New Member
Less
More
- Posts: 2
- Thank you received: 0
3 weeks 4 days ago #259853
by bjtilley
Replied by bjtilley on topic How to set the values of variables defined in Twig templates
Thanks for replying!
Would that be this file:
And how would I make this message different per survey?
Would that be this file:
Code:
locale/_template/limesurvey.pot
And how would I make this message different per survey?
Please Log in to join the conversation.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13655
- Thank you received: 2492
3 weeks 4 days ago #259862
by DenisChenu
bugs.limesurvey.org/view.php?id=19283
1. In survey theme {{ gT("Enter the access key") }}
2. In DB : source_message : id=1, message = 'Enter the access key'
3. in DB : message : id=1,language=fr, translation='Entrez le code d'accés'
The n you can create any number of string and use specific theme for this. No way (currently) to do it via Survey only.
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic How to set the values of variables defined in Twig templates
Best is to use DB for thisWould that be this file:
Code:locale/_template/limesurvey.pot
bugs.limesurvey.org/view.php?id=19283
And how would I make this message different per survey?
1. In survey theme {{ gT("Enter the access key") }}
2. In DB : source_message : id=1, message = 'Enter the access key'
3. in DB : message : id=1,language=fr, translation='Entrez le code d'accés'
The n you can create any number of string and use specific theme for this. No way (currently) to do it via Survey only.
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Please Log in to join the conversation.