Jump to content

Zion - custom coding wanted for a potfolio page menu label to lead to ANOTHER portfolio page with menu labels

Recommended Posts

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

temp 1.png

temp 2.png

temp 3.png

Link to comment
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

temp 1.png

temp 2.png

temp 3.png

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 by HoaLT

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

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!

Screenshot 2024-08-08 113534.png

Link to comment
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!

Screenshot 2024-08-08 113534.png

You can share site url, I will check & give you exact code

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • 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.