- Posts: 8
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Dynamically show footer
- PlinioMayer
- Topic Author
- Offline
- New Member
Less
More
3 years 7 months ago #204424
by PlinioMayer
Dynamically show footer was created by PlinioMayer
I'm really new in LimeSurvey and I'm having some troubles customizing the template.
I have an specfic problem: How can I show the footer only in the first page (is there any way to track the current page via twig?)?
And a more general problem: is there any documentation for the aSurveyInfo variable?
I have an specfic problem: How can I show the footer only in the first page (is there any way to track the current page via twig?)?
And a more general problem: is there any documentation for the aSurveyInfo variable?
The topic has been locked.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12890
- Thank you received: 3965
3 years 7 months ago #204426
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic Dynamically show footer
Hi,
what is "the first page"?
The "welcome page" or the first page of questions?
Joffm
what is "the first page"?
The "welcome page" or the first page of questions?
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: PlinioMayer
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10099
- Thank you received: 3589
3 years 7 months ago #204437
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 Dynamically show footer
1) Detecting various pages in twig files:
2) Explore the aSurveyInfo object:
Code:
{% if (aSurveyInfo.aNavigator.show and aSurveyInfo.include_content == 'firstpage') %} <!-- Do something in the Welcome page --> This is the welcome page! {% endif %} {% if (aSurveyInfo.aNavigator.show and aSurveyInfo.include_content != 'firstpage') %} <!-- Do something in question pages --> This is a question page! {% endif %} {% if (aSurveyInfo.aNavigator.show == null) %} <!-- Do something in the End page --> This is the End page! {% endif %}
2) Explore the aSurveyInfo object:
Code:
{{ dump(aSurveyInfo) }}
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: Joffm, PlinioMayer
The topic has been locked.
- PlinioMayer
- Topic Author
- Offline
- New Member
Less
More
- Posts: 8
- Thank you received: 0
3 years 7 months ago #204442
by PlinioMayer
Replied by PlinioMayer on topic Dynamically show footer
The answer from tpartner is enough for now, but thank you for the quick response.
The topic has been locked.
- PlinioMayer
- Topic Author
- Offline
- New Member
Less
More
- Posts: 8
- Thank you received: 0
3 years 7 months ago #204443
by PlinioMayer
Replied by PlinioMayer on topic Dynamically show footer
I understand that I can dump the aSurveyInfo, still it's a huge object and it's hard to find which configuration I need. I was wondering if there's no page documenting each property.
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10099
- Thank you received: 3589
3 years 7 months ago #204448
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 Dynamically show footer
Not as far as I know. I have been asking for it for years.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- PlinioMayer
- Topic Author
- Offline
- New Member
Less
More
- Posts: 8
- Thank you received: 0
3 years 7 months ago #204453
by PlinioMayer
Replied by PlinioMayer on topic Dynamically show footer
One last question, if you allow me, is there any way to track the progress of the survey. Something like page 1 or 10%?
The topic has been locked.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12890
- Thank you received: 3965
3 years 7 months ago #204458
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic Dynamically show footer
Well, this is not so easy.
We had a lot of discussions about it.
The problem are questions/pages that are skipped because of relevance equations.
So there is no automatism.
But using ".gseq" or "."qseq" you may display the sequential number of a page.
Joffm
We had a lot of discussions about it.
The problem are questions/pages that are skipped because of relevance equations.
So there is no automatism.
But using ".gseq" or "."qseq" you may display the sequential number of a page.
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.