Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

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

  • Leithy
  • Leithy's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
2 years 3 weeks ago - 2 years 3 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
Code:
 <title>
        {{ processString(aSurveyInfo.surveyls_title,1) }}
    </title>


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


 
Last edit: 2 years 3 weeks ago by Leithy.

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 3 weeks ago #233780 by tpartner
1) You can explore the aSurveyInfo array.

Code:
{{ dump(aSurveyInfo) }}


2) You can use ExpressionScript variables.

Code:
{{ 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.

  • Leithy
  • Leithy's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
2 years 3 weeks ago - 2 years 3 weeks ago #233781 by Leithy
Thanks Tony - alternative method (found by viewing code of welcome.twig) is:
Code:
<title>
{{ processString(aSurveyInfo.description,1) }}
</title>

(ie the reserved string is "description")

 
Last edit: 2 years 3 weeks ago by Leithy.

Please Log in to join the conversation.

Moderators: holchtpartner

Lime-years ahead

Online-surveys for every purse and purpose