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

More
4 years 2 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.
More
4 years 2 months ago #217325 by tpartner
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.
More
4 years 2 months ago #217519 by DenisChenu

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.
The following user(s) said Thank You: tpartner
The topic has been locked.
More
4 years 2 months ago - 4 years 2 months ago #217521 by tpartner

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: 4 years 2 months ago by tpartner.
The topic has been locked.
More
4 years 2 months ago #217523 by DenisChenu

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 support - Plugins, theme and development .
I don't answer to private message.
The following user(s) said Thank You: tpartner
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose