Jump to content

Ricard

Member
  • Posts

    11
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Ricard's Achievements

  1. Hello! I was wondering if it would be possible to create a date picker that redirects to a third party booking page for my hotel website (www.calmarrufes.com). I've been told that their search engine accepts URL parameters, being id_idioma the language, fecha_entrada the date of check in and n_noches the number of nights. Here's the example of an availability search for the 1st of May for 4 nights: https://www.reservaonline.support/calmarrufes/reservas.html?1&id_idioma=1&fecha_entrada=01/05/2024&n_noches=4 I was imagining something clean an simple, something like the example of the image without the number of people selection. Anyone can help me? Thanks in advance! Ricard
  2. Hey community, I tried to find how to solve it here but couldn't so hopefully any of you guys can help me. I have my web in different languages, i used this code to do it: https://www.bradgood.net/articles/multi-language-content-on-any-squarespace-template . So I don't know how to have a specific footer depending on the language that the user chooses. I have seen on the forum that somebody suggests to have multiple footers and then hide them depending on the language you are, but i cannot figure it out how to do it. My website is: www.calmarrufes.com Best!
  3. Okay I managed to find a fix for the cta button and for the issue that showed all the links for a fraction of second. My only issue now is that I cannot have a different footer depending on the language. I have seen on the forum that somebody suggests to have multiple footers and then hide them depending on the language you are, but i cannot figure it out how to do it.
  4. Regarding the CTA button I would like to have it like this: catalan: Reserva ara spanish: Reserva ahora english: Book now And concerning how I am hiding the links, heres the full code: <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/2.6.0/css/flag-icon.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script> <script> $(function() { /* SETUP MULTI-LANGUAGE */ var defaultLanguage = 'ca'; var lang = location.pathname.split("/")[1]; var defaultClass = 'lang-'+defaultLanguage+''; var itemParent = "nav [class*='collection'],nav [class*='folder'],nav [class*='index'],nav [class*='group']"; if (lang == "" || lang.length > 2 ){ var lang = defaultLanguage; } /* ADD LANGUAGE CLASSES */ $('a[href="/"]').addClass('lang-'+defaultLanguage+'').parents(itemParent).addClass('lang-'+defaultLanguage+''); $('nav a:link:not([href^="http://"]):not([href^="https://"])').each(function () { var langType = $(this).attr('href').split("/")[1]; var multiLanguageClass = 'multilanguage lang-' + langType + ''; if (undefined !== langType && langType.length <= 2) $(this).addClass(multiLanguageClass).parents(itemParent).addClass(multiLanguageClass); }); $('nav button').each(function () { var langTypeFolder = $(this).attr('data-controller-folder-toggle').split("/")[0]; var multiLanguageClass = 'multilanguage lang-' + langTypeFolder + ''; if (undefined !== langTypeFolder && langTypeFolder.length <= 2) $(this).addClass(multiLanguageClass); }); /* HOMEPAGE-LOGO LINKS TO PROPER LANGUAGE HOMEPAGE */ if (lang == "es") { $('a[href="/"]').attr("href", "/es/inici/"); } if (lang == "en") { $('a[href="/"]').attr("href", "/en/inici/"); } /* ADD EXCLUSION NAV ITEMS */ $('.exclude-me,.exclude-me a').addClass('exclude'); $('.sqs-svg-icon--list a,.SocialLinks-link,.header-menu-controls-control').addClass('exclude'); /* REMOVE OTHER LANGUAGES AND KEEP EXCLUDED ITEMS */ $('.multilanguage:not(".lang-'+lang+',.exclude")').remove(); /*setup language switcher*/ $('body').prepend('<div class="language"><a href="/ca/inici" class="lang-cat">cat</a> | <a href="/es/inici/" class="lang-es">esp</a> | <a href="/en/inici/" class="lang-en">eng</a></div>'); if (lang == "ca") { $('section[data-section-id="6539a0872ecc656144301c97"]').remove(); } if (lang == "es") { $('section[data-section-id="650eb3301a6932094d727f7e"]').remove(); } if (lang == "en") { $('section[data-section-id="650eb3301a6932094d727f7e"]').remove(); } }); </script>
  5. Thank you so much again for your help. Regarding the language switcher being not visible I put your custom css and gives me an error:
  6. Hi! I have a few issues with my new web, hope somebody can help me with some of them. I have the web in 3 languages now (planning to add a forth one). - Is there a way to change the CTA button depending the language you are navigating? - when you access to the web you can see all the header links in all languages for a brief moment and then they dissaper. Is there a way to avoid that? - Can I have 3 (or 4) different footers depending on the selected language? I seen a code somewhere but is only for two, the code is written to work for 3. - Last doubt, the language selector links disappear when i scroll down, is there a way to anchor them always on the top no matter if I scroll down? Thank you for any help!
  7. Hi! I'm building my website and trying yo implement multiple language options however I cannot hide the header links of the main language in the secondary language home page. I established for each page the proper url slug: /cat or /es as es/inici for the spanish home page. I used this code: https://www.bradgood.net/articles/multi-language-content-on-any-squarespace-template but obviously I am doing something wrong. Anyone can help? thanks
×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.