Adding an anchor to a repeater

Hi there!

I am trying to take an arrow shape and add a link to the end of a sliding repeater. Here is a link to a video showing what I am referring to. https://www.loom.com/share/419d6de05ea6482b929130a828561def

When I click on the last image in the repeater block, there is no option for an anchor.

Hi ! Thank you for your question.
I’m Meytal and I’m part of the Editor X Product team.

In regards to your request, we don’t currently offer this feature, but we have plans to begin working on something similar in the near future as we know it offers value to our users.
I will pass your feedback on to the rest of the Editor X team.
Meytal

Thank you so much!

Hi! We need this too. I want to jump from a menu to separate vertical anchor blocks.

Thanks!

Hi @leo ,
Hadar here from the X team.
Applying an anchor is available for the repeaters items, so you can easily apply the anchor to the first item.
If you wish to add more info on what you’re trying to create, please share so we can be more specific.

Hi Hadar,

Thanks for your reply! Yes, you can jump to the first item, because it’s the top of the section. But I could not place an anchor to the individual repeater items.
Every item starts with an image.

So I have placed the content in sections. But if it worked with repeaters it’s much easier to build.

Greetings

Hey @leo ,

What you are looking for can be achieved with a few lines of code,
using the scrollTo function in Velo.
I will say in advance that this will only work for vertical scrolling (which is your case),
This is the url for the example:
https://idoh33.editorx.io/mysite-115

I’m also attaching a video of an example I made that demonstrates how to do this:

Here’s the code:

$w.onReady(function () {
    repeaterAnchors();
});

function repeaterAnchors(){

 let buttons = $w('#button01, #button02, #button03, #button04, #button05');
 
    $w('#repeater1').forEachItem(($item,itemData,index)=>{
        buttons[index].onClick(()=>{
            $item('#repeaterItem').scrollTo();
        })
    })

}


Hi @idoh This is the solution, thanks for your answer!

Hi,
What if you wanted to also put the buttons in a repeater so that it multiplies based on the number of items you have. How would you do this in that case?

Nevermind, I already figured it out