Welcome to the LimeSurvey Community Forum

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

To get Survey group data on homepage?

  • ziankabir
  • ziankabir's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
7 months 2 weeks ago - 7 months 2 weeks ago #250291 by ziankabir
To get Survey group data on homepage? was created by ziankabir
Please help us help you and fill where relevant:
Your LimeSurvey version: CE 6.2.0
Own server or LimeSurvey hosting: Own server
Survey theme/template: Own custom theme
==================
How can I show the list of survey groups on the homepage by customizing any theme or developing a plugin?
I tried creating a plugin and calling the event 'beforeController' & push the survey group over there. Doesn't work. 
Secondly, I tried creating a custom theme &
accessing the survey group data from 'layout_survey_list' but the theme doesn't have access to survey groups. 
Here's an example how I tried:
Code:
//get the survey group data 
{% set surveyGroups = ()() %}
//print the data
{% if surveyGroups %}
<ul>
{% for group in surveyGroups %}
<li>{{ }}</li>
{% endfor %}
</ul>
{% else %}
<p>No survey groups found.</p>
{% endif %}
Last edit: 7 months 2 weeks ago by ziankabir. Reason: refoormat code

Please Log in to join the conversation.

Lime-years ahead

Online-surveys for every purse and purpose