A Key for Migrating Key Expressions from 2.x to 3.x

Mehr
2 Monate 4 Tage her #168865 von duvemyster
duvemyster erstellte das Thema A Key for Migrating Key Expressions from 2.x to 3.x
Has a key already been development somewhere outlining key expressions what work in 2.x that would need to be changed in a migration to 3.x, and how they would need to be change?

For example, in 2.x in the template editor a survey name is {SURVEYNAME} but in the 3.x theme editor it is {{ aSurveyInfo.name }}. Which of the depreciated keywords have a similar method like this by which they can be referenced in 3.x?

Has something along those lines already been developed? It sure would be helpful!

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
2 Monate 3 Tage her - 2 Monate 3 Tage her #168922 von tpartner
tpartner antwortete auf das Thema: A Key for Migrating Key Expressions from 2.x to 3.x
These are two different things.

{{ aSurveyInfo.name }} is Twig variable.
To see all available items in the aSurveyInfo array, add this to the Twig file:

{{ dump(aSurveyInfo) }}

{SURVEYNAME} is an Expression Manager variable.
Denis has implemented a fix so we can also access those in the Twig files - github.com/LimeSurvey/LimeSurvey/pull/1025 .
So, to use that, you would place something like this in the Twig file:

{{ processString(aSurveyInfo.surveyls_title) }}
{{ processString('{SURVEYLANGUAGE}') }}
{{ processString('{strip_tags(TOKEN:ATTRIBUTE_1)}') }}

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Letzte Änderung: 2 Monate 3 Tage her von tpartner.
Folgende Benutzer bedankten sich: duvemyster

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