Go Headless

/

Velo
Articles
API Overview
Getting Started
Tutorials
Velo Package Readmes
Release Notes

Velo-Only APIs
About Velo-Only APIs and the SDK
$w
Introduction
Styling Elements with CSS
$w()
at()
onReady()
Accordion
AccountNavBar
AddressInput
Anchor
AppointmentField
AudioPlayer
Background
Box
Breadcrumbs
Button
Captcha
CartIcon
Chatbox
Checkbox
CheckboxGroup
CollapsibleText
Column
ColumnStrip
Container
CustomClassList
CustomElement
DashboardButton
DashboardHeading
DashboardIconButton
DashboardInfoIcon
DashboardInput
DashboardNumberInput
DashboardText
DashboardTextButton
DashboardToggleSwitch
Dataset
DatePicker
Document
Dropdown
DynamicDataset
Effects
Element
Event
Footer
Form
FormElement
Gallery
GalleryItemChangedEvent
GalleryItemClickedEvent
GalleryNavigationStartEvent
GoogleMap
HamburgerCloseButton
HamburgerMenuContainer
HamburgerOpenButton
HamburgerOverlay
Header
HiddenCollapsedElement
HtmlComponent
HtmlComponentMessageEvent
IFrame
IconMouseInEvent
Image
Introduction
CSS Classes
alt
clickAction
fitMode
src
tooltip
customClassList
deleted
global
id
parent
rendered
type
collapsed
hidden
isVisible
link
rel
target
effects
delete()
onMouseIn()
onMouseOut()
onViewportEnter()
onViewportLeave()
restore()
scrollTo()
collapse()
expand()
hide()
show()
onClick()
onDblClick()
KeyboardEvent
Lottie
MediaBox
Menu
MenuContainer
MenuItemMouseEvent
MobileButton
MobileContainer
MobileDatePicker
MobileElement
MobileImage
MobilePicker
MobileRepeater
MobileSwitch
MobileText
MobileTextInput
MobileVideoPlayer
MouseEvent
MultiStateBox
Node
Page
Pagination
PanelButton
PanelCheckboxGroup
PanelColorPicker
PanelDropdown
PanelFontAndColorPicker
PanelRadioButtonGroup
PanelRichText
PanelSectionDivider
PanelSlider
PanelTextInput
PanelThumbnails
PanelToggleSwitch
PostPage
ProductPage
ProgressBar
QuickActionBar
QuickActionBarItemClickedEvent
RadioButtonGroup
RangeSlider
RatingsDisplay
RatingsInput
ReactComponent
ReactEvent
Repeater
RichContentViewer
RichTextBox
SearchButton
Section
SelectionTags
SignatureInput
Slide
Slider
Slideshow
SlideshowButton
State
Style
Switch
Tab
Table
TableCellEvent
TableRowEvent
Tabs
Text
TextBox
TextEffects
TextInput
TextMarquee
TextMask
ThankYouPage
TimePicker
UploadButton
VectorImage
Video
VideoBox
VideoPlayer
ViewChangeEvent
WixComments
WixDataFilter
WixDataSort
WixEvents
WixFormSubmitEvent
WixFormSubmittedErrorEvent
WixFormSubmittedEvent
WixForms
WixFormsV2
$widget
wix-animations-frontend
wix-configs-backend
wix-http-functions
wix-realtime-backend
wix-application
wix-editor
wix-widget

APIs
About Velo APIs and the SDK
wix-activity-counters.v2
wix-analytics.v2
wix-auth
wix-billing.v2
wix-billing-backend
wix-blog-backend
wix-bookings-frontend
wix-bookings.v1
wix-bookings.v2
wix-bookings-backend
wix-business-tools.v2
wix-cache-backend
wix-captcha.v2
wix-captcha-backend
wix-chat-backend
wix-comments.v2
wix-crm-frontend
wix-crm.v2
wix-crm-backend
wix-dashboard
wix-dashboard-management.v2
wix-data
wix-data.v2
wix-ecom.v2
wix-ecom-frontend
wix-ecom-backend
wix-email-marketing.v2
wix-events-frontend
wix-events.v2
wix-events-backend
wix-fetch
wix-forms.v2
wix-forum.v2
wix-forum-backend
wix-groups.v2
wix-groups-backend
wix-inbox.v2
wix-location-frontend
wix-loyalty.v2
wix-marketing-backend
wix-marketing.v2
wix-marketing-tags.v2
wix-media-backend
wix-media.v2
wix-members-frontend
wix-members.v2
wix-members-backend
wix-mobile
wix-multilingual.v2
wix-navigate-mobile
wix-pay-frontend
wix-pay-backend
wix-payment-provider-backend
wix-pricing-plans-frontend
wix-pricing-plans.v2
wix-pricing-plans-backend
wix-pro-gallery-backend
wix-realtime-frontend
wix-reviews.v2
wix-restaurants.v2
wix-search
wix-secrets-backend
wix-secrets-backend.v2
wix-seo-frontend
wix-site-frontend
wix-site-backend
wix-storage-frontend
wix-storage-mobile
wix-stores.v2
wix-stores-frontend
wix-stores-backend
wix-table-reservations.v2
wix-tags.v1
wix-urls.v2
wix-web-module
wix-window-frontend
wix-site-plugins.v1

Events & Service Plugins
About Events & Service Plugins and the SDK
Activity Counters
Automations
Billing
Bookings
Business Tools
Comments
CRM
Data
eCommerce
Email Marketing
Forms
Forum
Groups
Inbox
Loyalty
Marketing
Marketing Tags
Media
Members
Pricing Plans
Payments
Pro-Gallery
Routers
Site Monitoring
Stores
Table Reservations
Wix Events

link


linkstring

Sets or gets the element's link.

When the element is clicked, the browser navigates to the link location.

The different types of links you can use are:

  • /localPageURL: another page on your site
  • /: your site's home page
  • http(s)://: an external web address
  • wix:document://: a document stored in the Media Manager
  • mailto:?subject=: an email
  • tel:: a phone number

The link property attempts to properly encode the URL value that you set. For example, .../some page is encoded to .../some%20page. However, some URLs do not have one unambiguous encoding. In those cases it is up to you to encode the URL to reflect your intentions. Because of these situations, it is a best practice to always encode URLs before you set them as the value of the link property. Regardless of how you set the link property, when you get its value, it returns an encoded URL.

Note that Wix URLs do not contain spaces. A page which has spaces in its name has its spaces replaced with dashes (-). Similarly, a dynamic page URL which contains the value of a field in your collection with spaces has its spaces replaced with dashes (-).

Did this help?