How do I create dynamic links to pages – PHP – SitePoint Forums

Thanks for trying to help clear my cloud of confusion on this.

The user would enter no value. They would simply click on a menu selection.

Here is the current page that I am re-designing:

I have a hierarchical menu selection that consists of mixed submenus and gallery selections (i.e. “Dungeons and Dragons” will take you to a submenu, while “Oriville Heroclix” will take you to the gallery as there are no other sets associated with this product line.

Routing is basically handled by a page table where I store the link type (menu or site), menu table or set table id, display order (if any) , the identifier of the parent menu # of the page table.

I mainly want clean URLs for SEO purposes. (Although I’ve read mixed opinions on whether removing the URL variable pass improves SEO).

Ideally, the pretty URL would change, depending on what I’m trying to produce on the index page:

Example menus:

When the user clicks on a menu selection, I want to detect that if the first “/” is followed by “menu”, to trigger the menu section of the index page and create a child menu from the table of pages that are associated with the parent menu for “dungeons-and-dragons-realm-icons”.

Example gallery:

When a user clicks on a gallery selection (for a specific set), I want to detect that the first “/” is followed by “gallery”, to trigger the gallery section of the index page and create the gallery for that Position. From this url, I want to extract the middle element of “critical-role” because that will match a value in the product line array, and extract the last element from “monsters-of-taldorei” because that will match the name from the whole.

If the rewrite rule is changed to “RewriteRule . /index.php [L,QSA]’, so I’m not sure what to do next. Does this mean that any url containing a “/” is going to be returned to the index.php page, then I use the coding on the index page to extract the items between the slashes, to determine what is displayed on the summary?

Harry L. Blanchard