I’ve just discovered how to use a “slug” to go to a destination page with a certain parameter.
For my app, I wish to allow all of my users to have their own landing page and I have made use of my Users’ slugs in order to do this. I built a ‘default’ page and based on the URL path, I will set this page to show my User’s own settings (title, opening-hours, profile image etc.)
Is there a way for me to permanently save all this information AT THAT SPECIFIC URL or must I save this information in my database?
A little confused what you mean by saving the info “At that specific URL.”
Those pieces of data (title, opening-hours, images etc.) all sound like they are specific pieces of data to each user so will need to be stored in the database.
In the ‘User’ data type, you can simply add “title,” “opening-hours” etc. fields and allow your users to edit their own specific info somewhere on your site.
Then change the “Type of content” on your default ‘landing/profile’ page to “user” so that whenever someone navigates to “yoursite.com/profilePage/User’sSlug” it will automatically fill your page with the data that is specific to the slug of that user.
Okay I see thanks for replying to me!! So can I confirm that any piece of information (pictures, text etc.) have to be saved in my database first, then retrieved from the database by matching the slugs?
Also, do you know if it is possible to make the custom URLs begin with the slug instead of appearing behind my web page urls? For example, currently my urls are appearing as “myapp.com/slug.com” but is there a way for me to make it appear as “slug.myapp.com” or something like that?
Yep all that data must be saved in the database first and then will automatically be pulled from the database when the slug matches (Remember to first set the page Content Type to “user”).
Not sure about the different URL format sorry! You might have to try find another thread on that topic