Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Variables that can be used in twig files

  • blocka
  • blocka's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
2 years 9 months ago #217315 by blocka
Is there a reference for variables we can use in twig files?

In my case, I want to replace {{ aSurveyInfo.name }} in the nav_bar.twig with the site name. But I cannot find a reference to how to do this... Hoping for some guidance!
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 9 months ago #217325 by tpartner
Replied by tpartner on topic Variables that can be used in twig files
As far as I know, there is no reference for the variables in the manual and I see no variable for the site name. I think you will need to hard code it.

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
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 9 months ago #217519 by DenisChenu
Replied by DenisChenu on topic Variables that can be used in twig files

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.
The following user(s) said Thank You: tpartner
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 9 months ago - 2 years 9 months ago #217521 by tpartner
Replied by tpartner on topic Variables that can be used in twig files

You can use {{ getConfig("sitename") }}

github.com/LimeSurvey/LimeSurvey/blob/d0...g_Extension.php#L645
Nice!

I assume that all values from the lime_settings_global table are available via that function. Correct?

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 2 years 9 months ago by tpartner.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 9 months ago #217523 by DenisChenu
Replied by DenisChenu on topic Variables that can be used in twig files

I assume that all values from the lime_settings_global table are available via that function. Correct?

 
Yes, and more.

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.
The following user(s) said Thank You: tpartner
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose