I’ve got 2 pages created:
/news - this is the summaries of each blog / news post. Image and summary.
/news_post - this is the actual blog post / news post. The image and summary from /news, as well as the full content.
I also have 2 data sets created named the same.
In the /news page, it uses the data from the 1st image above and displays the image, title and summary.
When you click on the title, I want it to redirect to /news/[title of blog post] and display the data from the 2nd image.
How on earth do we do this?
Hi there,
There’s several ways to do this, or similar to this.
-
the ‘News’ page is a page set to datatype newsPost. Set it up so when there’s no newsPost in the URL, to instead show your repeating group with a list of newsPosts. Each newsPost will need a Slug that is set. Setup each newsPost’s link in this repeating group when you click it, you Go To Page → Current page (News). Data to send → This Cell’s newsPost. Now when you click one of the newsPosts, it’ll add that newsPosts’s slug to the URL.
-
Instead of keeping it all under ‘News’, you could have a hybrid approach where /News is always the summaried data, and you Go To Page → ‘news_post’. So your URL would go from example.com/news to example.com/news_post/dogs-voted-mans-best-friend
-
A combination of the above using Page Paths - where you’re setting paths in the URL manually, and on page load setting which part of the URL to refer to when pulling data to load.
Thank you so much @msgiblin. Extremely helpful, and I’ve gone for Option 1.
1 Like