Customizing twig template

Mehr
2 Monate 1 Woche her #180334 von apires
COM_KUNENA_MESSAGE_CREATED_NEW
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

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

LimeSurvey Partners
Mehr
2 Monate 1 Woche her #180336 von LouisGac
COM_KUNENA_MESSAGE_REPLIED_NEW

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
2 Monate 1 Woche her - 2 Monate 1 Woche her #180337 von apires
COM_KUNENA_MESSAGE_REPLIED_NEW
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.
Anhang:
Last edit: 2 Monate 1 Woche her by apires.

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

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

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
2 Monate 1 Woche her #180339 von jelo
COM_KUNENA_MESSAGE_REPLIED_NEW

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 an der Konversation teilzunehmen.

Mehr
2 Monate 1 Woche her #180350 von apires
COM_KUNENA_MESSAGE_REPLIED_NEW
God bless you!! It works now :))

Many thanks

Cheers

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
2 Monate 1 Woche her #180353 von jelo
COM_KUNENA_MESSAGE_REPLIED_NEW

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 an der Konversation teilzunehmen.

Mehr
2 Monate 1 Woche her #180354 von LouisGac
COM_KUNENA_MESSAGE_REPLIED_NEW
Denis didn't force it at all, it's been very welcome.

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

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