Welcome to the LimeSurvey Community Forum

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

Own Theme options

  • f.risse
  • f.risse's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 days 20 hours ago #269927 by f.risse
Own Theme options was created by f.risse
Please help us help you and fill where relevant:
Your LimeSurvey version: 6.11.0+250303
Own server or LimeSurvey hosting: Own Server (Ubuntu/Apache)
Survey theme/template: Extended_fruity
==================
How do I create own Theme options that are called by the "custom.css"?

I understand how I can edit the design but not how I can add own Theme options for the user creating the survey.
For example: Next to the Background color options i a colorpicker where you can enter the Button Color (Extended_fruity_Colors.png). The Button Color is then called by the custom.css.

Currently, I can hard code it in the "custom.css" but not make it variable for the user.

My thoughts behind this: The persons who create the survey can't and shouldn't touch the theme code. If one person want reds and the other blue buttons, I need to create a new theme for them. It's easier if each person can set their own color in the theme options in the survey.

Please Log in to join the conversation.

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
3 days 20 hours ago #269928 by DenisChenu
Replied by DenisChenu on topic Own Theme options
Only on config.xml : github.com/LimeSurvey/LimeSurvey/blob/41...nilla/config.xml#L62
You need to update current, sometime need to reset theme (unsure here)

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.
The following user(s) said Thank You: f.risse

Please Log in to join the conversation.

  • tammo
  • tammo's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
1 day 21 hours ago - 14 hours 2 minutes ago #269939 by tammo
Replied by tammo on topic Own Theme options
I have seriously changed all options. This is done in twig-files. Please see:  LimeSurvey 6 theme | Respondage

Tammo


Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
Last edit: 14 hours 2 minutes ago by tammo.

Please Log in to join the conversation.

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
20 hours 47 minutes ago #269942 by DenisChenu
Replied by DenisChenu on topic Own Theme options

I have seriously changed all option. This is done in twig-files. Please see:  LimeSurvey 6 theme | Respondage
 
With 5X : yes, we can need to update twig files, gitlab.com/SondagesPro/SurveyThemes/skel...tions?ref_type=heads
But with 6 : I really think we can use only options XML part. gitlab.com/SondagesPro/SurveyThemes/skel...l?ref_type=heads#L41

If there are lacks of option : mantis :)

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.

Please Log in to join the conversation.

  • f.risse
  • f.risse's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
20 hours 25 minutes ago - 20 hours 23 minutes ago #269944 by f.risse
Replied by f.risse on topic Own Theme options
For everyone who is interested, how I did it:
First of all "LS" does not stands for LimeSurvey but the company I work at.

I edited the xml file for my extended theme
Code:
/limesurvey/upload/themes/survey/LS_fruity/config.xml
 
This will add a ThemeOption.
Here I added <ls_btnColor>
Code:
type=""
will be the input type (button, colorpicker, text)
Code:
category=""
decides in which category, the option will be displayed 
Code:
title=""
will be the Displayed name for the option

then added this part to the layout_global.twig in the theme editor
i also did it in the layout_survey_list.twig because the surveylist dosn't use the layout_global.twig
 

now i can use the css variables in the custom.css:
 
Last edit: 20 hours 23 minutes ago by f.risse.
The following user(s) said Thank You: DenisChenu, tpartner

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
11 hours 49 minutes ago #269959 by tpartner
Replied by tpartner on topic Own Theme options
Thanks for sharing.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose