Welcome to the LimeSurvey Community Forum

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

Add link to logo

  • irs_sept
  • irs_sept's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
2 years 7 months ago #219734 by irs_sept
Add link to logo was created by irs_sept
Can you help me with adding a link to my logos in nav_bar.twig?

I use the following code to add two logos:
Code:
<div class="{{ aSurveyInfo.class.navbarbrand }} logo-container hidden-xs"  {{ aSurveyInfo.attr.navbarbrand }}  >
    {{ image('./files/pic1.png', 'Logo1', {"class": "img-responsive pull-left"}) }}
    {{ image('./files/pic2.png', 'Logo2', {"class": "img-responsive pull-left"}) }}
</div>

I know how to use oldschool html to add a linked picture, but if I use this, the layout (and I guess the responsivness) is broken.

Thanks!
Christoph
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 7 months ago #219760 by DenisChenu
Replied by DenisChenu on topic Add link to logo
> I know how to use oldschool html to add a linked picture

Maybe best to keep it :)

else {{ image('./files/pic1.png', 'Logo1', {"class": "img-responsive pull-left"}) }} return an image link <img class="img-responsive pull-left" alt="Logo1" src="assets/pic1.png"> , just wrap with your link

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.
  • irs_sept
  • irs_sept's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
2 years 7 months ago #219762 by irs_sept
Replied by irs_sept on topic Add link to logo
mmmh, I guess I need a little bit more help...
Code:
<a href="https://link.com/">{{ image('./files/pic1.png', 'Logo1', {"class": "img-responsive pull-left"}) }} </a>
and
Code:
<a href="https://link.com/"><img class="img-responsive pull-left" alt="Logo1" src="/tmp/assets/655fccd2/pic1.png"> </a>

are technically working, but the image gets really huge after wraping it with <a href>...</a>. I need to manually shrink it with "height=...." what I want to avoid cause of not breaking the responsivness.

also in the second version the "./files/..."-path is not working...but thats another storry.
The topic has been locked.
  • tammo
  • tammo's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
2 years 7 months ago #219766 by tammo
Replied by tammo on topic Add link to logo
I think it may distract the user and make people leave the survey if you provide them with "a way out".
Best to make distractions and links to pages outside of the survey as low as possible, preferably 0 (zero).

Tammo


Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose