- Posts: 7
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Listing Templates in use
- macanics
- Topic Author
- Offline
- New Member
Less
More
10 years 1 month ago #106052
by macanics
Listing Templates in use was created by macanics
Is there a method for listing all templates that are in use - i.e. selected for any survey? I'm looking for a way to cull our unused custom templates.
---john---
---john---
The topic has been locked.
- amit01
- Offline
- New Member
Less
More
- Posts: 1
- Thank you received: 0
10 years 1 month ago #106056
by amit01
Replied by amit01 on topic Listing Templates in use
Hi
I have not yet come across with such a method present in current version of LimeSurvey. I guess you will have to write it manually , if you actually need it.
--
cheers
amit
I have not yet come across with such a method present in current version of LimeSurvey. I guess you will have to write it manually , if you actually need it.
--
cheers
amit
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10109
- Thank you received: 3595
10 years 1 month ago - 10 years 1 month ago #106065
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 Listing Templates in use
Sorry, no, you'll have to do it the painful way
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 10 years 1 month ago by tpartner.
The topic has been locked.
- fransmarcelissen
- Offline
- Premium Member
Less
More
- Posts: 113
- Thank you received: 46
10 years 1 month ago - 10 years 1 month ago #106069
by fransmarcelissen
Replied by fransmarcelissen on topic Listing Templates in use
The following solution is not painful if you understand a tiny bit of mysql:
Run the following sql statement in phpmyadmin, R or php
select folder,count(s.template) from
(SELECT * FROM `lime_templates` left join lime_surveys on folder=template
union
select * from lime_templates right join lime_surveys on folder=template ) as s
group by s.folder
This leads to a list of templates and the number of surveys that uses this template:
basic 0
bluengrey 0
citronade 1
clear_logo 0
default 2
DigiPsy 10
..
..
(I am not very good in sql, probably this can be done in a simpler way, but this works)
Frans
Run the following sql statement in phpmyadmin, R or php
select folder,count(s.template) from
(SELECT * FROM `lime_templates` left join lime_surveys on folder=template
union
select * from lime_templates right join lime_surveys on folder=template ) as s
group by s.folder
This leads to a list of templates and the number of surveys that uses this template:
basic 0
bluengrey 0
citronade 1
clear_logo 0
default 2
DigiPsy 10
..
..
(I am not very good in sql, probably this can be done in a simpler way, but this works)
Frans
Last edit: 10 years 1 month ago by fransmarcelissen.
The following user(s) said Thank You: DenisChenu
The topic has been locked.