Dynamic breadcrumbs using nodejs

I am working on creating a dynamic breadcrumb setup on the website I am working on.

I have created a pages table that has the title, description, slug, and category setup. I have setup the database insert and update to modify the slug based on the category selected. (this tends to match the routing setup when a page is created). I have also created the page with insert and update models that works as intended.

The one part that I am missing is how to tell the nodejs server what page the user is on so that it can pull the information from the database.

I tried looking at https://docs.wappler.io/t/filtering-database-query-with-an-url-parameter/2868 but it did not seem to apply when the Url might be several layers deep (i.e. www.example.com/test/test1/test2/test3/test4/test5/test6/rest7).

Would anyone have any advice on how to resolve this? Or is there a different method that I should do?

In the alternative, I could setup a static breadcrumb on each page and use what I have created as a “site map” of sorts.

Community Page
Last updated: