Customizing twig template

Mehr
4 Monate 1 Woche her #180334 von apires
Customizing twig template wurde erstellt von apires
Hi,

I'm migrating the LimeSurvey from our company (v2.0.0) to a lastest one (3.15.6),
I already have everything working in the new one, but, having some issues.

So, in the oldest version, we got a few customizing fields and flows, for example, at the begining of survey, we have an pop-up asking for the user wanna asnwer for the group of companies, or a individual one.

My issues is about passing variables to the html (welcome.twig) page. I'm newbie in php, more newbie with twig development. In the oldest version (startpage.pstpl), we pass variables from replacements_helper.php (templace_replace) to the screen using {variable}, and in the newest one, is something like {{name}}.

I've looking in the projects, and all the variables is passed by "i.e aSurveyInfo.class.something", it should be the same?

I've tried almost everything, and cant pass variable values from replacements_helper to the page.. any idea?

Best regards
Anhänge:

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

LimeSurvey Partners
Mehr
4 Monate 1 Woche her #180336 von LouisGac

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
4 Monate 1 Woche her - 4 Monate 1 Woche her #180337 von apires
Thanks for the information.

I've readed this topic before, and still stuked with this problem in my head.
Its not suposed to pass variables from replacements_helper.php file to the view? welcome.twig for example? when the page loads, i can echo all the variables to Chrome console, but cant display in welcome.twig page... i'm trying with {{ variable }} and its not working.
Anhänge:
Letzte Änderung: 4 Monate 1 Woche her von apires.

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
4 Monate 1 Woche her #180338 von apires
I've tryied with 1 and 2 bracelets {{ }} and nothing.. :(

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
4 Monate 1 Woche her #180339 von jelo

apires schrieb: I've tryied with 1 and 2 bracelets {{ }} and nothing.. :(

It's still very messy. Not every twig template is correctly getting every variable.

To display variables like in LS2, you should try processString.
{{ processString("{VARNAME}") }}

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Folgende Benutzer bedankten sich: DenisChenu

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
4 Monate 6 Tage her #180350 von apires
God bless you!! It works now :))

Many thanks

Cheers

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
4 Monate 6 Tage her #180353 von jelo

apires schrieb: God bless you!! It works now :))

You can thank Denis for forcing to implement this. It's always good to have developers with first hand experience on actual running a survey. You cannot take that for grated here ;-)

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
4 Monate 6 Tage her #180354 von LouisGac
Denis didn't force it at all, it's been very welcome.

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Jetzt loslegen!

Melden Sie sich jetzt an, und erstellen Sie in wenigen Minuten Ihre erste Umfrage.

Account einrichten

Abonnieren Sie unseren Newsletter

Abonnieren Sie unseren Newsletter für alle Neuigkeiten rund um LimeSurvey
captcha