HansSchouten / PHPageBuilder

A drag and drop page builder to manage pages in any PHP project
https://www.phpagebuilder.com
MIT License
732 stars 180 forks source link

Passing url parameter like {slug} to pages #65

Open dumithsalinda opened 3 years ago

dumithsalinda commented 3 years ago

Is there a way to pass url parameters like slug to dynamic pages.. similar to laravel.

blog/{slug} etc

Thank you

HansSchouten commented 3 years ago

Hi, yes this is possible by creating routes that have exactly that syntax. See this code.

witu9217 commented 3 years ago

Hi, I have added a route in the DB as blog/{slug} and i have created a block. Now the question is how to i access that slug variable in the blocks page?

Thank you

sid9841 commented 1 year ago

any updates? Stuck on same issue!