I have followed the Connect CMS video and have created Blog page that shows the blogs from collections and Blog Single page that shows the post. However, when I am connecting the Link Button from Blog page to Blog Single page using the “:slug”, I see that all my links are always opening the same first blog page.
Have tried multiple times with connecting slug but still failing and always opens first blog post. In fact all my Menu items are now pointing to the “domain.com/blog#id” which results in all broken links.
Yes I have done that. But when I preview and reload - it seems to not save and goes back to showing just slug entry instead of the 2nd one where $value->get(“slug”) is called.
Hello Pakic. I changed the new Route Variable adding a key slug and then connected the variable Slug from Data. Now it shows this and the links work.
But all my navbar links are not fixed yet - they still seem to append the entire Blog-single URL and then have the section ID appended at the end. How can I ensure the navbar links don’t change and retains the section IDs which navigates to proper home sections?
@talktoari :
You are struggling with “Anchorlinks” and how to achieve anchorlinks from a secondary page back to the first page. Try this solution I’ve written about earlier:
It’s a bit complex but not too complicated actually
Thanks @MixxMaster I guess this will help me once the routing issue above is resolved. My routing issue is basically:
Originally my navbar links are in format: <domain.com>/#about-us
When I navigate to all Blogs page or Single blog page of the collections, the nabber link changes to: domain.com**/blog**#about-us
All I’m looking for is how to ensure the nabber links don’t change to get that additional /blog in them.
After that gets sorted, I can use your solution to directly scroll to the respective page section. Thats why I was looking for DivHunt staff or @Pakic to help