After reading this article you’ll know how to:
Turn the navigation bar component into the header partial
Reuse the partial on another page
Auto-generate partials while setting up a new page
Partial is a part of your application’s page that consists of one or multiple components. Creating partials is essential for those citizen developers who want their website to have the same components with functionality on various pages in their application. Usually, these components will be the header and footer of the page. In this article, we will go through the way of turning the navigation bar (header) into the partial, and then we will reuse it. Also, you are going to find out how to auto-generate partials while setting up a new page.
Reusing and editing partial
In this part, we will reuse the header partial we’ve just created on another page in the application.
Of course, you can always edit your partial, but mind that changes will apply to all the pages you’ve used this partial on.
Click once on the partial. In the sidebar menu, choose the
Also, it’s possible to turn the partial back into the regular component. To do this, come back to the partial options and choose the
One more way of reusing partials is during setting up a new page. Let’s try this in practice.
Auto generating partials
Last but not least use case we are going to walk through is auto generating the top menu and footer partials. This function might appeal to those who want to quickly create the default header and footer for their application and then later edit them.