Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

anchor function

kathys75015221
Level 3
Level 3

Hello,

Could anyone explain how to use the anchor function in the VEC please?

What should I do if I want a CTA anchor to a certain position on the same page? How about on another page?

Thank you

1720953_pastedImage_0.png

3 Replies
Andrey_Osadchuk
Community Advisor
Community Advisor

Kathys,

The anchor is used to mark a place to which you want directly refer via a hyperlink. The dialog shown in the screenshot is exactly how to do it.

Select a text fragment that represent the desired destination for the CTA. Open that dialog and enter the name, for example cta-destination.

Then select the CTA and add/update the hyperlink.

If the CTA is referring to another page, then append the anchor name after the hash character (https://www.site.com/page#cta-destination).

If the CTA is referring to the anchor placed on the same page, then select "link to anchor in the text" option in the link builder dialog and enter cta-destination.

kathys75015221
Level 3
Level 3

Hi Andrey - many thanks.

I selected the first line of a paragraph down on the page, where I want the CTA on top of the same page to anchor to this paragraph.

I created an anchor name for the first line of the paragraph and saved the change, then the selected text shows an underline

I then went to edit the CTA but no anchor can be found. Could you let me know how to progress please? Thank you so much

1725960_pastedImage_2.png

kathys75015221
Level 3
Level 3

I just tested on another page (which is a SPA). It seems that you have to select a container that can include both your CTA and the anchor destination. They are far away from each other and I'm not able to select them all together on my test page...

On the SPA, I managed to link a CTA to the anchor name. However, in QA, clicking the CTA took me to our homepage - the url shows www.ourhomepage.co.uk/#destination

any idea what I did wrong? Thank you very much!

1725961_pastedImage_0.png