Variables that can be used in twig files

More
1 year 1 week 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
1 year 1 week 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
1 year 4 days ago #217519 by DenisChenu
You can use {{ getConfig("sitename") }}

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

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.
More
1 year 4 days ago - 1 year 4 days 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: 1 year 4 days ago by tpartner.
The topic has been locked.
More
1 year 4 days 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 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.

Start now!

Just create your account and start using Limesurvey today.

Register now