Welcome to the LimeSurvey Community Forum

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

Get Title for a question group in tempate?

  • brettd
  • brettd's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 8 months 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.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
10 years 8 months ago #107209 by DenisChenu
Replied by DenisChenu on 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 support - Plugins, theme and development .
I don't answer to private message.
The topic has been locked.
  • brettd
  • brettd's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 8 months ago - 10 years 8 months ago #107213 by brettd
Replied by brettd on 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: 10 years 8 months ago by brettd. Reason: bug fix
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
10 years 8 months ago #107230 by DenisChenu
Replied by DenisChenu on 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 support - Plugins, theme and development .
I don't answer to private message.
The topic has been locked.
  • Mazi
  • Mazi's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
10 years 8 months ago #107235 by Mazi
Have a look at www.limesurvey.org/manual/Expression_Man...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
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
10 years 8 months ago #107280 by DenisChenu
Replied by DenisChenu on topic Get Title for a question group in tempate?

Mazi wrote: Have a look at www.limesurvey.org/manual/Expression_Man...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 support - Plugins, theme and development .
I don't answer to private message.
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose