Get Title for a question group in tempate?

More
3 years 2 months ago #107193 by brettd
brettd created the topic: Get Title for a question group in tempate?
I would like to access the Title of the current group (or maybe question) in my template.

I've read the template and Expression Manager and can't see any reference to a variable name for the Title, comparable to {QID} or {SGQ}. Is there any easy way to access the Title in javascript? I would like to use it in my analytics.

Thanks.

Brett

Please Log in to join the conversation.

More
3 years 2 months ago #107209 by DenisChenu
DenisChenu replied the topic: Get Title for a question group in tempate?
You're rigth, there a lack of documentation here.

You can use all core replacer : github.com/LimeSurvey/LimeSurvey/blob/ma...ents_helper.php#L703

{GROUPNAME} for the current group title.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in to join the conversation.

More
3 years 2 months ago - 3 years 2 months ago #107213 by brettd
brettd replied the topic: Get Title for a question group in tempate?

DenisChenu wrote: You're right, there a lack of documentation here.

You can use all core replacer : github.com/LimeSurvey/LimeSurvey/blob/ma...ents_helper.php#L703

{GROUPNAME} for the current group title.


I am actually very impressed with the LimeSurvey documentation. It's as good or better than documentation for other paid software, like Adobe's. Thanks to all who have laboured on it.


Thanks. This is exactly what I was looking for and saved me looking through the source for now - my poll is already 5 days behind schedule... ;-)

Alas, GROUPNAME and GROUPDESCRIPTION don't work (they are null), although GID, SQA, etc. do. I have tried them both in endgroup.pstpl and endpage.pstpl.

This is not a big deal. I was just trying to set something more useful for a page title in piwik. I'll use SQA for now, and look into this further after my poll is published today.

Thanks for your help. I hope to contribute some dev time to LimeSurvey after this poll is up and running. I'd be glad to help with the registration code, where I have done some minor hacks already this week.

Brett
Last Edit: 3 years 2 months ago by brettd. Reason: bug fix

Please Log in to join the conversation.

More
3 years 2 months ago #107230 by DenisChenu
DenisChenu replied the topic: Get Title for a question group in tempate?
Maybe you can use it only when there are a question ?

And only if you have set the survey with 'Show group title' (or Show both).

And you can use jquery to have the groupname too ($(".grouptitle").text() in some template).

Denis

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in to join the conversation.

More
3 years 2 months ago #107235 by Mazi
Mazi replied the topic: Get Title for a question group in tempate?
Have a look at manual.limesurvey.org/Expression_Manager...each_Keyword_Used.3F to see where each placeholder can be used. Note that this might be a little outdated.


Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"

Please Log in to join the conversation.

More
3 years 2 months ago #107280 by DenisChenu
DenisChenu replied the topic: Get Title for a question group in tempate?

Mazi wrote: Have a look at manual.limesurvey.org/Expression_Manager...each_Keyword_Used.3F to see where each placeholder can be used. Note that this might be a little outdated.

With need this file in a HTML array ;)

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now