- Posts: 34
- Thank you received: 9
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
- Topic Author
- Offline
- Junior Member
Less
More
1 year 5 months ago - 1 year 5 months ago #233779
by Leithy
Theme editing: Changing method that title is displayed head.twig was created 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
To
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: 1 year 5 months ago by Leithy.
Please Log in to join the conversation.
- tpartner
- Away
- LimeSurvey Community Team
Less
More
- Posts: 10104
- Thank you received: 3593
1 year 5 months ago #233780
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Theme editing: Changing method that title is displayed head.twig
1) You can explore the aSurveyInfo array.
2) You can use ExpressionScript variables.
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
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 34
- Thank you received: 9
1 year 5 months ago - 1 year 5 months ago #233781
by Leithy
Replied by Leithy on topic Theme editing: Changing method that title is displayed head.twig
Thanks Tony - alternative method (found by viewing code of welcome.twig) is:
(ie the reserved string is "description")
Code:
<title> {{ processString(aSurveyInfo.description,1) }} </title>
(ie the reserved string is "description")
Last edit: 1 year 5 months ago by Leithy.
Please Log in to join the conversation.