Welcome, Guest
Username: Password: Remember me

TOPIC: Get Title for a question group in tempate?

Get Title for a question group in tempate? 3 months 3 weeks ago #107193

  • brettd
  • brettd's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 5
  • Karma: 0
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 administrator has disabled public write access.

Get Title for a question group in tempate? 3 months 3 weeks ago #107209

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6226
  • Thank you received: 792
  • Karma: 238
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.
The administrator has disabled public write access.

Get Title for a question group in tempate? 3 months 3 weeks ago #107213

  • brettd
  • brettd's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 5
  • Karma: 0
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 months 3 weeks ago by brettd. Reason: bug fix
The administrator has disabled public write access.

Get Title for a question group in tempate? 3 months 3 weeks ago #107230

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6226
  • Thank you received: 792
  • Karma: 238
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
The administrator has disabled public write access.

Get Title for a question group in tempate? 3 months 3 weeks ago #107235

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5301
  • Thank you received: 291
  • Karma: 247
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)limesurvey.org'"
The administrator has disabled public write access.

Get Title for a question group in tempate? 3 months 3 weeks ago #107280

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6226
  • Thank you received: 792
  • Karma: 238
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 ;)
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.130 seconds
Donation Image