Welcome to the LimeSurvey Community Forum

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

Different header inclusion

  • sanjeev
  • sanjeev's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 3 months ago #130117 by sanjeev
Different header inclusion was created by sanjeev
how to have different header section for all template??

please suggest how to keep conditional header and footer for survey list page and similarly for other also
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 3 months ago #130123 by holch
Replied by holch on topic Different header inclusion
Sorry, but it is not clear what you want.

Do you want to change the header layout for the whole template? This should be easy in the template editor.

Do you want differenly styled headers in the same template (for different sections of the questionnaire)? this will probably require some work with Javascript, I guess.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • sanjeev
  • sanjeev's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 3 months ago #130127 by sanjeev
Replied by sanjeev on topic Different header inclusion
Thank you for your quick response
i want to change different header for survey list page apart from other

so please tell me the script file where we can be able to have conditional header.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 3 months ago #130136 by tpartner
Replied by tpartner on topic Different header inclusion
You can add something like this to the class attribute of the <body> element in startpage.pstpl:
Code:
{if(SURVEYLIST, ' survey-list-page', ' survey-page')}

So, the <body> tag would look something like this:
Code:
<body class="default lang-{SURVEYLANGUAGE} {SURVEYFORMAT}{if(SURVEYLIST, ' survey-list-page', ' survey-page')}">

This will apply a class "survey-list-page" to the survey list page and "survey-page" to all survey pages. You could then modify the various template files with elements to be shown/hidden depending on those classes.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • sanjeev
  • sanjeev's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 3 months ago #130153 by sanjeev
Replied by sanjeev on topic Different header inclusion
Thanks for your reply

I have one more question can you please let me know the file path where survey form post so that we can update a custom table simultaneously using last insert id of a survey by respondent i unable to get exact file or function so that i can be able to do custom work.

Your quick response is highly appreciable.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose