Theme editing: Changing method that title is displayed head.twig

More
2 months 2 weeks ago - 2 months 2 weeks ago #233779 by Leithy
Please help us help you and fill where relevant:
Your LimeSurvey version: 5.x
Own server or LimeSurvey hosting:Own
Survey theme/template: Vanilla extended
==================

Hi there - quick question about the correct reserved string to use for survey description in theme twig files.

Issue: We use the text element titles of surveys differentiate versions, launch dates etc that we wish to hide and replace with more user friendly titles

Suggested implementation: Record our user friendly title in the description field (being mindful of character length) and alter our extended Vanilla theme to display the description field where the title field would go normally

Question: In head.twig what is the correct reserved string name for description - is it as simple as?:

From
 <title>
        {{ processString(aSurveyInfo.surveyls_title,1) }}
    </title>


To
 <title>
        {{ processString(aSurveyInfo.surveyls_description,1) }}
    </title>


 
Last edit: 2 months 2 weeks ago by Leithy.

Please Log in to join the conversation.

More
2 months 2 weeks ago #233780 by tpartner
1) You can explore the aSurveyInfo array.

{{ dump(aSurveyInfo) }}


2) You can use ExpressionScript variables.

{{ processString('{SURVEYDESCRIPTION}') }}

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: Leithy

Please Log in to join the conversation.

More
2 months 2 weeks ago - 2 months 2 weeks ago #233781 by Leithy
Thanks Tony - alternative method (found by viewing code of welcome.twig) is:
<title>
{{ processString(aSurveyInfo.description,1) }}
</title>

(ie the reserved string is "description")

 
Last edit: 2 months 2 weeks ago by Leithy.

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now