Welcome to the LimeSurvey Community Forum

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

hide language changer in top nav (on privacy page)?

  • rikatechdoku
  • rikatechdoku's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
5 years 4 months ago #177618 by rikatechdoku
Hello all,

I want to hide the language changer in the top nav on the privacy (data protection statement) page, because it is anyway available in the main content of that page.

I saw that "..../views/subviews/navigation/language_changer_top_menu.twig" includes the line
Code:
{% if  aSurveyInfo.alanguageChanger.show == true %}
So, how do I set aSurveyInfo.alanguageChanger.show to false for the privacy page?

Many thx, regards, S.

I'm using the hosted LimeSurvey Pro version (at least 3.15) on LS servers, AND also the locally installed xampp version as well (at least 3.15).
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 4 months ago #177620 by tpartner
If you want it for all surveys using that theme, simply comment out or remove the contents of that IF block.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • rikatechdoku
  • rikatechdoku's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
5 years 4 months ago #177623 by rikatechdoku
Replied by rikatechdoku on topic hide language changer in top nav (on privacy page)?
Many thx for that quick reply, Tony Partner!

If I may point it out, I am thinking, though, that you misunderstood my question.

If I comment out the whole if block, i.e. commenting out the whole top-nav-language changer, then the language changer would be gone on all survey pages. However, I want to add only the privacy page to the list of pages of where to hide it.

Thx again, though, the support here (including you) is very good!

I'm using the hosted LimeSurvey Pro version (at least 3.15) on LS servers, AND also the locally installed xampp version as well (at least 3.15).
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 4 months ago #177630 by tpartner
Ah, okay, do you mean the welcome page?

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • rikatechdoku
  • rikatechdoku's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
5 years 4 months ago #177634 by rikatechdoku
Replied by rikatechdoku on topic hide language changer in top nav (on privacy page)?
I mean the page where this info: manual.limesurvey.org/Data_policy_settings is displayed.

I'm using the hosted LimeSurvey Pro version (at least 3.15) on LS servers, AND also the locally installed xampp version as well (at least 3.15).
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 4 months ago - 5 years 4 months ago #177637 by tpartner
Yes, that is the welcome page.

I don't know how to detect that page in your twig file but you might try adding this script to welcome.twig:

Code:
<script type="text/javascript" charset="utf-8">
  $(document).on('ready pjax:scriptcomplete',function() {
    $('.form-change-lang').remove();
  });
</script>


Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 5 years 4 months ago by tpartner.
The topic has been locked.
  • rikatechdoku
  • rikatechdoku's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
5 years 4 months ago #177639 by rikatechdoku
Replied by rikatechdoku on topic hide language changer in top nav (on privacy page)?
Thx for trying to help!

The problem with this code is that is makes both language changers disappear. I want to keep the one in the main content of the page and only remove the top one in the nav bar.

I'm using the hosted LimeSurvey Pro version (at least 3.15) on LS servers, AND also the locally installed xampp version as well (at least 3.15).
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 4 months ago #177641 by tpartner
Code:
<script type="text/javascript" charset="utf-8">
  $(document).on('ready pjax:scriptcomplete',function() {
    $('.nav .form-change-lang').hide();
  });
</script>

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • rikatechdoku
  • rikatechdoku's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
5 years 4 months ago #177642 by rikatechdoku
Replied by rikatechdoku on topic hide language changer in top nav (on privacy page)?
Thx, that is a workable "almost"-solution. The final result after the page has fully loaded is perfect and what I want.

The only small downside is that at times on a reload of the page (e.g. when the language is changed with the still available language changer in the main section of the page) the top navbar-language-changer is still visible for a brief moment (flickers for one moment). But that's only for the record. Thx! I will use this for now.

I'm using the hosted LimeSurvey Pro version (at least 3.15) on LS servers, AND also the locally installed xampp version as well (at least 3.15).
The topic has been locked.
  • rikatechdoku
  • rikatechdoku's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
5 years 4 months ago #177644 by rikatechdoku
Replied by rikatechdoku on topic hide language changer in top nav (on privacy page)?
CHANGE - UPDATE:

It does not work good enough, sorry!
Because on a small screen (smart phone), when the links in the nav bar are compressed into a "hamburger" menu, then the hamburger box is still visible but when I expand it, it is empty -> not good. Could you help me to also hide the hamburger menu box in this case? Please. Then it would be really useable, I think. I don't yet know how to do that.

I'm using the hosted LimeSurvey Pro version (at least 3.15) on LS servers, AND also the locally installed xampp version as well (at least 3.15).
The topic has been locked.
  • rikatechdoku
  • rikatechdoku's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
5 years 4 months ago - 5 years 4 months ago #177649 by rikatechdoku
Replied by rikatechdoku on topic hide language changer in top nav (on privacy page)?
Ok, after trying around a bit, I found that it works for me (also on the smart phone) with this code at the moment (because I have no other link items left in that collapsable nav bar in my welcome page context, I can remove it all together on that page):
Code:
<script type="text/javascript" charset="utf-8">
  $(document).on('ready pjax:scriptcomplete',function() {
    $('.navbar-collapse').remove();
  });
</script>
Thx for all the help!!

I'm using the hosted LimeSurvey Pro version (at least 3.15) on LS servers, AND also the locally installed xampp version as well (at least 3.15).
Last edit: 5 years 4 months ago by rikatechdoku.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose