CMS: Linking to a Dynamic Page

5 min read
When you create a dynamic page, you create a single page layout that can be used multiple times to display different items from your collection.
The only way for your visitors to access the dynamic pages on your site, is by clicking an element, such as a button, text box, or menu item, that redirects to the dynamic page. The content that is displayed is based on the URL of the page.
New datasets experience:
In Wix Studio, we've moved datasets to the Inspector panel on the right to make them easier for you to use. Learn more about the new datasets experience in Wix Studio
In this article, learn how to:

Linking to a dynamic item page from a text box

When you create a static link to a dynamic item page, you create a link that always redirects to the page for that specific item. 

To link from a text box:

  1. Click the text box element in the Editor. 
  2. Click Edit Text
  3. Click the Link icon .
  4. Select Page
  5. Select the dynamic page you want to link to under Which page?
  6. Select the item in your collection under Which Item?
  7. Select how the dynamic item page opens: New window or Current window.
  8. Click Done.
Screenshot of the Text Settings and 'What do you want to link to' panels. A dynamic page is selected from the drop-down.

Linking to a dynamic item page from a menu item:

Use the Manage Menu panel to add an item to your menu that links to the dynamic page for a specific item in your collection.

To link from a menu item:

  1. Click the menu in the Editor. 
  2. Click Manage Menu
  3. Click + Add Menu Item.
  4. Click Dynamic Pages.
  5. Select the dynamic page you want to link to under Which page?
  6. Select the item in your collection under Which Item?
  7. Select how the dynamic item page opens: New window or Current window.
  8. Click Done.
Screenshot of the Manage Menu and What do you want to link to? panels. A dynamic page and an item are chosen from drop downs

Linking to an anchor on a dynamic page

Link directly to an anchor on a dynamic page to guide site visitors to a specific point on your site. In the example below, the link is in the main menu and goes to an anchor called Full of Falafel on a dynamic list page of food products.

To link to an anchor:

  1. Click the menu in the Editor. 
  2. Click Manage Menu
  3. Click + Add Menu Item.
  4. Click Anchor.
  5. Select the required dynamic page from the Which page? drop-down.
  6. Select the item under Which item?
  7. Select the anchor from the Which anchor on this page? drop-down.
  8. Click Done
  9. Enter a name for the menu item.
  10. Click Done.
Screenshot of the What do you want to link to? panel with an anchor from a page selected

Linking to dynamic item pages from multi-item elements

Set up a multi-item element, such as a repeater, so clicking an item redirects to the dynamic page displaying that item's content.
Let's say you want to display a list of items from your collection, and have each item link to the dynamic item page for that item. You have three options for this: tables, galleries, and repeaters.
For example, on your recipes site, you could use a repeater to show previews of your recipes. In your repeater, you include an image to display the picture of the dish from your collection, and then link from the image item to the dynamic item page for your recipe items.

To link from a repeater multi-item element:

  1. Click the repeater element on your page.
  2. Click the Connect to Data icon .
  3. Click the Connect a dataset drop-down, and select the required dataset.
  4. Click Image under Components.
  5. Click the Image source connects to drop-down and select the image field. 
Screenshot of the Connect Repeater panel, highlighting the 'Image source connects to' drop-down.
  1. Click the Link connects to drop-down.
  2. Select the required page under Dynamic Pages.
Screenshot of the Connect Repeater panel, highlighting dynamic pages under the 'Link connects to' drop-down.

Linking to the "next" or "previous" dynamic page

Let your visitors navigate between your dynamic pages. Add 2 buttons on your page and link them to the "Next Dynamic Page" and "Previous Dynamic Page" options in the Connect to Data panel.
On a dynamic item page, navigation buttons display the next or previous item page in your collection. On a dynamic list page, the buttons display the next or previous category page in your collection. 
For example, on a site featuring food products, you can set up a dynamic list page with a repeater to show products of specific types. Each dynamic page will feature food from each category, such as Breakfast, Dessert, or Healthy. 
Adding buttons to go to the "Next dynamic page" and "Previous dynamic page" allows the site visitor to navigate between dynamic pages displaying products from each category.

To set up navigation buttons:

  1. Click the button on your dynamic item page.
  2. Click Change Text & Icon.
Screenshot of the Editor showing a repeater, the connect Button panel, and the 'Click action connects to' drop-down
Tip:
Dynamic pages are displayed in alphabetical order by their URL. Note that numbers come before letters, and uppercase letters come before lowercase letters. In other words, "Ziti" comes before "apple pie."

Did this help?

|