- Posts: 5
- Thank you received: 1
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
{{ aQuestion }} is empty
2 years 1 day ago - 2 years 1 day ago #213980
by Shaogul
{{ aQuestion }} is empty was created by Shaogul
hi there
im having real troubles creating my own theme in LS [url=http://localhost/limesurvey/index.php/admin/questions/sa/view/surveyid/139476/gid/1/qid/1#modalSystemInformation]3.25.19+210323[/url]. in my question view, i want to display the question code, therefore i tried using {{ aQuestion.code }}, just as it is used in the vanilla theme. the problem ist, the variable is empty and returns NULL. I have searched the forum, read the manual on creating themes and haven't found anything that would help. am i missing something?
(im running limesurvey on xampp on windows 10)
cheers
im having real troubles creating my own theme in LS [url=http://localhost/limesurvey/index.php/admin/questions/sa/view/surveyid/139476/gid/1/qid/1#modalSystemInformation]3.25.19+210323[/url]. in my question view, i want to display the question code, therefore i tried using {{ aQuestion.code }}, just as it is used in the vanilla theme. the problem ist, the variable is empty and returns NULL. I have searched the forum, read the manual on creating themes and haven't found anything that would help. am i missing something?
(im running limesurvey on xampp on windows 10)
cheers
Last edit: 2 years 1 day ago by Shaogul.
The topic has been locked.
2 years 21 hours ago #213999
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 {{ aQuestion }} is empty
{{ aQuestion }} will never work because aQuestion is an array. You need to use the dump function.
What file are you trying to place it in?
Both of these work in, for example, question_text_content.twig.
What file are you trying to place it in?
Both of these work in, for example, question_text_content.twig.
Code:
{{ dump(aQuestion) }}
Code:
{{ aQuestion.code }}
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
2 years 7 hours ago #214017
by Shaogul
Replied by Shaogul on topic {{ aQuestion }} is empty
hey, thx for the quick reply
so i used the dump function to see whats in the array, it just returned NULL. i used it in question.twig which i included in my main.twig
so i used the dump function to see whats in the array, it just returned NULL. i used it in question.twig which i included in my main.twig
The topic has been locked.
2 years 6 hours ago #214031
by jelo
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Replied by jelo on topic {{ aQuestion }} is empty
Perhaps a LimeSurvey version issue? LS 3.25.19+210323 may be the reason.Both of these work in, for example, question_text_content.twig.
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
2 years 6 hours ago #214035
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 {{ aQuestion }} is empty
Yes, perhaps. They both work for me in question.twig using version 3.25.8.
Perhaps a LimeSurvey version issue? LS 3.25.19+210323 may be the reason.Both of these work in, for example, question_text_content.twig.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.