Get Title for a question group in tempate?

More
8 years 1 month ago #107193 by brettd
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
The topic has been locked.
More
8 years 1 month ago #107209 by DenisChenu
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 , plugin development .
I don't answer to private message.
The topic has been locked.
More
8 years 1 month ago - 8 years 1 month ago #107213 by brettd

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: 8 years 1 month ago by brettd. Reason: bug fix
The topic has been locked.
More
8 years 1 month ago #107230 by DenisChenu
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 , plugin development .
I don't answer to private message.
The topic has been locked.
More
8 years 1 month ago #107235 by Mazi
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
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com
Want to use your survey offline -> www.offlinesurveys.com
The topic has been locked.
More
8 years 1 month ago #107280 by DenisChenu

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 , plugin development .
I don't answer to private message.
The topic has been locked.

Start now!

Just create your account and start using Limesurvey today.

Register now