scottsmobile Posted August 5 Share Posted August 5 Hi there, Essentially I am wanting to repeat the same zion page type within itself, but I'm not sure how? I would like my 'zion' template to do something it seemingly can't do - I want to click on my menu item 'private gardens' on my 'projects' (portfolio) homepage, and for that to take me to my un-linked 'private gardens' (portfolio) page. The standard template doesn't allow me to do this, and I can only add in sections that don't include the phot background + big label menu + image change on rollover. Any help would be much appreciated? If it helps, the url slug for 'projects' page would be: (my website address)/projects If it helps, the url slug for 'private gardens' page would be: (my website address)/projects/privategardens I am happy to add the website address on my end, to complete the code, as long as its clear where i need to put this in Link to comment
HoaLT Posted August 5 Share Posted August 5 (edited) 14 hours ago, scottsmobile said: Hi there, Essentially I am wanting to repeat the same zion page type within itself, but I'm not sure how? I would like my 'zion' template to do something it seemingly can't do - I want to click on my menu item 'private gardens' on my 'projects' (portfolio) homepage, and for that to take me to my un-linked 'private gardens' (portfolio) page. The standard template doesn't allow me to do this, and I can only add in sections that don't include the phot background + big label menu + image change on rollover. Any help would be much appreciated? If it helps, the url slug for 'projects' page would be: (my website address)/projects If it helps, the url slug for 'private gardens' page would be: (my website address)/projects/privategardens I am happy to add the website address on my end, to complete the code, as long as its clear where i need to put this in You can try some js code to change the default URL setting from Squarespace: Principle: get the URL for each item in the homepage and change its href into unlinked portfolio <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> <script> $('a.portfolio-hover-item[href="/work/fashion"]').attr('href','/fashion-portfolio'); $('a.portfolio-hover-item[href="/work/lifestyle"]').attr('href','/likestyle-portfolio'); </script> The original solution I refer to from @tuanphan here: Edited August 5 by HoaLT tuanphan and Beyondspace 2 Press 👍 or mark my comment as solution if you find my sharing useful 🆒 Squarespace pinchzoom lightbox plugin (affiliate link) 👁🗨 360 degree photo viewer (affiliate link) Link to comment
scottsmobile Posted August 8 Author Share Posted August 8 Thanks so much for your help HoaLT- as I'm a complete beginner with coding, can you tell me where (exactly) in my squarespace site I will be pasting this code? Is it in projects (portfolio page) > advanced, or private gardens (portfolio page) > advanced, or somewhere else? I have had a go myself, see below, pasting into projects > advanced, but it did not work <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> <script> $('a.portfolio-hover-item[href="/projects/privategardens"]').attr('href','/projects-portfolio'); </script> I am leaving 'public spaces' page as it is, on the 'projects' (portfolio) page- so would this be left out of the code completely, and the code is just for projects > private gardens? Or does it still need to be included in the code, as it is still a menu item on the 'projects' page? I am a bit unclear what URL I am putting in for 1A, 1B, 2A & 2C the URL for projects page is: /projects the URL for private gardens is: /privategardens OR should it be /projects/privategardens ? Apologies again for my beginner-ness! Beyondspace 1 Link to comment
tuanphan Posted August 10 Share Posted August 10 On 8/8/2024 at 9:23 AM, scottsmobile said: Thanks so much for your help HoaLT- as I'm a complete beginner with coding, can you tell me where (exactly) in my squarespace site I will be pasting this code? Is it in projects (portfolio page) > advanced, or private gardens (portfolio page) > advanced, or somewhere else? I have had a go myself, see below, pasting into projects > advanced, but it did not work <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> <script> $('a.portfolio-hover-item[href="/projects/privategardens"]').attr('href','/projects-portfolio'); </script> I am leaving 'public spaces' page as it is, on the 'projects' (portfolio) page- so would this be left out of the code completely, and the code is just for projects > private gardens? Or does it still need to be included in the code, as it is still a menu item on the 'projects' page? I am a bit unclear what URL I am putting in for 1A, 1B, 2A & 2C the URL for projects page is: /projects the URL for private gardens is: /privategardens OR should it be /projects/privategardens ? Apologies again for my beginner-ness! You can share site url, I will check & give you exact code Beyondspace 1 Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment