Page with path that can accept multiple parameters
Page with path that can accept multiple parameters
At a glance
The community members are discussing how to create a page that can accept any number of parameters in the URL path and store them in an array. The original poster provides an example where the URL "example.com/data/data2" would result in the "slug" array having "data" at index 0 and "data2" at index 1.
The comments suggest using the syntax "/:param1/:param2" to handle two parameters, and potentially extending it to "/:param1/:param2/.../:param100" to handle up to 100 parameters. One community member notes that this may be a "sloppy implementation" and suggests using the "/:name*" syntax instead, which can handle any number of parameters.
A community member also provides a link to external documentation about content management systems, which may be relevant to the discussion.
Is there a way to make a page that can accept any amount of parameters in the path and create an array? So for example if it's example.com/:slug and the url entered is example.com/data/data2, slug[0] would equal data and slug[1] would equal data2