Forum Academy Marketplace Showcase Pricing Features

Dynamic Pages created from user input

Let’s say that I’m re-creating craigslist, where I have people creating a Classified Ad. They fill out a form, and then click “post”. How do I create a public/shareable page to display that Data? So the workflow would need to create a dynamic URL for Ad creators to share or paste into emails. When end users click on the URL, they are taken to the custom landing page for that Classified Ad where they are also required to register and login to view the Ad for example.

The part I’m struggling with, is how do you create that dynamic page so that it has a dynamic URL assigned to it?

You may take advantage of “unique id” field from your ad table. Every record in your table has this unique id. You take it and build your URL with this id.

On the display part, you get the id value from URL and search for it in that specific table to get the ad details.


LE: Removed the ** , thanks @sridharan.s

Just like how @constantingaspar shows, but without the ** before and after the unique ID.

Note - you’ll also need to set the page’s type of content to the corresponding type of content (in the example the ad-details page would be to Ad or whatever it’d be called in that database)

Thanks! I’ll give it a go.