SmallSitesSarah Posted July 13, 2023 Posted July 13, 2023 URL: https://heartology-backend.squarespace.com/ Password: Heartology My client has three distinct types of audiences and wants different experiences for each. The navigation items need to change depending on which kind of customer is viewing the site. I’m using code to hide or unhide nth child nav items on desktop and mobile, but it is extremely clunky and sometimes breaks formatting on other parts of the pages. I wonder whether I can achieve a solution using a method similar to what others have used for multi-lingual sites like this instructional page or this forum question. The mock-up landing page looks like this: Each audience should see different headers in the navigation. I used these paths and would like to show/hide the correct items according to the audience. /seniors /students /physicians Tagging @tuanphan @paul2009 and @creedon as I can see you’ve addressed similar questions in other posts, though I can't find the exact answer I'm looking for. Thanks in advance for any ideas you have! paul2009 1
creedon Posted July 13, 2023 Posted July 13, 2023 The Brad Good code is an excellent launch point to get to where you want to go. Please see the following. If you think it will work for you respond back here. SmallSitesSarah and paul2009 1 1 Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.
paul2009 Posted July 13, 2023 Posted July 13, 2023 I agree, Brad’s guide (that you linked in your question) should provide a working solution, using ‘seniors’ instead of ‘en’ and so on. I wouldn’t recommend using ‘nth’ selectors for a production site as it will be difficult to maintain. creedon 1 Me: I'm Paul, a SQSP user for >18 yrs & Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥. Work: Founder of SF.DIGITAL. We provide high quality original extensions to supercharge your Squarespace website. Content: Views and opinions are my own. Links in my posts may refer to my own SF.DIGITAL products or may be affiliate links. Forum advice is completely free. You can thank me by selecting a feedback emoji. Buying a coffee is generous but optional.
SmallSitesSarah Posted July 13, 2023 Author Posted July 13, 2023 10 hours ago, creedon said: The Brad Good code is an excellent launch point to get to where you want to go. Please see the following. If you think it will work for you respond back here. Thanks so much for responding @creedon and @paul2009! Yes, I agree the Brad Good code is the best solution. My coding knowledge stops with CSS, so I'm not sure how to make it work for me. Can you help?
creedon Posted July 13, 2023 Posted July 13, 2023 I DM'd @SmallSitesSarah. SmallSitesSarah 1 Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.
SmallSitesSarah Posted July 18, 2023 Author Posted July 18, 2023 @creedon Thanks so much for your 1:1 help! Question: I added another page (/seniors/about-us), but it's not showing in the senior page nav. Can you help?
creedon Posted July 18, 2023 Posted July 18, 2023 Quote but it's not showing in the senior page nav. You need to remove, make a copy somewhere or comment out your custom CSS that is hiding things. <style> .header-nav-item:nth-child( 3 ) { display : none; } .header-nav-item:nth-child( 4 ) { display : none; } .header-nav-item:nth-child( 5 ) { display : none; } .header-nav-item:nth-child( 6 ) { display : none; } .header-nav-item:nth-child( 7) { display : none; } </style> Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.
SmallSitesSarah Posted July 19, 2023 Author Posted July 19, 2023 21 hours ago, creedon said: You need to remove, make a copy somewhere or comment out your custom CSS that is hiding things. <style> .header-nav-item:nth-child( 3 ) { display : none; } .header-nav-item:nth-child( 4 ) { display : none; } .header-nav-item:nth-child( 5 ) { display : none; } .header-nav-item:nth-child( 6 ) { display : none; } .header-nav-item:nth-child( 7) { display : none; } </style> I totally forgot I had injected that code into the header of my pages. Thank you! creedon 1
SmallSitesSarah Posted August 19, 2023 Author Posted August 19, 2023 (edited) @creedon New question. Now that this is set up, is it possible to forward a subdomain to each home page? For example, students.heartologypatientadvocacy.com forwards to heartologypatientadvocacy.com/students. I feel like I've read it's not possible, but just checking to see what you think. Edited August 19, 2023 by SmallSitesSarah
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment