Ability to Add Links to Containers

Request:
Currently, we are able to do this using Velo however it complicates the process and doesn’t allow changes to be made easily. We need the ability to add a link directly to container or box without having to use velo.

Example and Use Case:
If we had this ability, we could convert boxes into navigation options for users click and be brought to other pages or display lightboxes without having to add a button to a container or using code. For example, the image below is of a site we created and this page is a “hub” to navigate to other pages using a repeater. Previously we had this set up with a button on top of the content but on mobile, the height of the button was not correctly set. No matter what changes we made, it showed perfectly in the editor but on actual mobile, it wouldn’t display properly. We are now using hover interactions to change the color of the container and using velo to check the title text to see what page it needs to navigate to when clicked. This greatly complicated the process because now if the title text changes, the code needs to as well. It would be a better experience if we could have just added a link directly to a container and changed it for each item.

Problems with current method:
Using the solution with code causes other issues like not being able to click a button and open in a new tab or window.

I also cant dynamically add links so unless I specify each page I want to link to, I cant connect this to a repeater that is connected using a dataset.

1 Like

Hi Cody, I’ve added this to our request list. I’ll also be forwarding it to our product team. Thank you for sharing.

1 Like

Awesome, thank you! I have a ton of different use cases and problems with this so if you team ever wants to meet on it I am always open!

The way to do this at this moment:
Use wix-location module

so import it first at the beginning of codessssssssssss

import wixLocation from 'wix-location';

then tell the code that you want to redirect user after a click.

$w('#container').onClick(()=>{
wixLocation.to('/shop')
})

Yeah I mentioned that you can achieve this using velo in the beginning of the post but there are drawbacks and complications with doing that. Currently in most situations we have done this using code.

Hi Cody, I’ve shared this with our team. As always, thank you for being so detail oriented. It really does help us get a better understanding in order to find solutions. :slight_smile:

1 Like

Of course! I am a product manager myself so I understand the difficulties of taking requests and then actually prioritizing and implementing them.

Again, if your team ever wants to meet to discuss this or any feature request, I’d love to make it happen!

@cstevens I’ll definitely make a note of this! I’ll be sending you a message shortly.

1 Like

agreed! Since we we can’t do interactions on anything but sections and containers (really hope interactions are coming to all elements, and more options like linking interactions to the mouse or scroll, etc.) we really need to be able to link containers.