Link to internal content

Say you have a homepage with links around the website. Even on those pages, you have internal links to other content pages. So say I have a page, /blog, that is linked on many pages, what is the best practice to link that page.

I fear that if I just entered /blog for the “Link URL”, that we get into a situation where that page is now not referenced in Builder. If that page url were now to change from /blog to say /articles, you would have to know every page that it was entered on in order to update the URL.

Is there a better way to do this within the editor?

If you want to just update your link in one place and have it applied across, check out our data models, we have a specific page for navigation links: Navigation Links | Builder.io Blueprints

In places where you are hardcoding the links in your pages, you can instead reference the data model.

That seems counter intuitive to have to create a data model for a page that should already have a reference point and url, does it not? If I create an “about us” page with the url “/about-us”, it doesn’t really make sense to create a data model that has the url and page name. But rather call out the page id. So now if I update the url to “/about”, I don’t have to change it in 2 or more places. The link I put in the header, footer, and in other content just references the id or slug. Am I understanding this correctly?

1 Like