Add Dynamic Page to Menu

I get the dynamic pages to work but I can’t figure out how to have them show up on the menu so someone can access them?

When you create a dynamic page, you’re designing one page layout that can be used over and over again, each time displaying a different item from your database collection . Since a dynamic page displays a different item each time it’s viewed, it’s not like a regular page. A regular page stores its content in the page itself, while the content for a dynamic page is stored in a database collection. Therefore, it is not displayed on the menu. Click here to lean more about dynamic pages.

Have a good day,
Tal.

If I understand what you said.
A dynamic page can’t displayed on the menu, therefore to access the dynamic page from the menu you need to have a regular page with links to the dynamic page and the dynamic page needs to have a link back to the menu pages?

Hey,
Dynamic pages cannot be displayed on the menu. Here’s a suggestion to resolve the issue:

  1. Adding a " Category " button to the header.

  2. Adding a table below the button and binding it to a DB collection of all of your pages categories.

  3. Hiding the table when the page is loaded.


4. Using the Wix-Location API and the data of the cell selected to redirect to the relevant page:

import wixLocation from 'wix-location';

export function tableCategories_cellSelect(event) {
	$w('#tableCategories').hide();
	const selected = event.cellData;
	wixLocation.to(`/minions/${selected}`);
}
  1. Showing the table at the mouseIn event when the user hover the categories button:
export function categoriesButton_mouseIn(event) {
	$w('#tableCategories').show();
}
  1. Hiding the table on the mouseOut event when the user is no longer hover the table or the categories button:
export function tableCategories_mouseOut(event) {
	$w('#tableCategories').hide();
}

export function categoriesButton_mouseOut(event) { 
	$w('#tableCategories').hide();
}

Another easier option ( in case you don’t have a lot of dynamic pages that you wish to be displayed on your menu ) is adding buttons linked to the relevant dynamic page.

Good luck,
Tal.

Thanks I have figured out the second. However, when I try and link the button, all seems fine except the dynamic page I want doesn’t show available until I pick another one, then go back to the one I want, which is now available?

Another question for which I haven’t really look hard yet but been thinking about. In the past web sites I’ve worked on I have been able to upload PDF’s to be pulled up by a site user for printing out.
How do I upload PDFS into a WIX site?

Hello,
I found how to add a link in the menu that points to a dynamic page.
You create an empty page and you name it as you want it to appear in your menu.
And in the code of this page you add this code:

import wixLocation from 'wix-location';


$w.onReady(function () {
	wixLocation.to("/mydynamicpagelocation/");
})

As the page is empty it goes very fast and it works for the mobile site too.

1 Like

big thank u!

@mike5services34
what is the - “mydynamicpagelocation”
how it looks like?