Using master page and partials, who do they work?


This is what i did:

Created a template style page (Admin Dashboard) with all the side/top bars, footer.
For the content of the page, i created a div with a simple text. The div is suppose to contain the contents for each new page i create using the master.
I made the page as master and the div as partial. But defining the div as partial it requested me to enter the file name???

I am confused as how the partial is to be used. The documentation on partials is minimal and does not help.

Please advise.

Hi @murugappan,
Partials are sort of another way to put together multi-use files. With a Master, you define the skeleton of a page, like the header and footer, that your content goes into. With a partial you can save, for example, three different versions of a header and decide which to use on a particular page. You can think of them like components. Make sense?
Instead, I think you want to make the inner div editable by adding the “Define Editable” action. That way on each sub-page everything will match the Master page except that div.
Hope this helps,

Hi @RobM

Already did use a editable field. It works fine. The partial here is specific to a page. Whereas in PHP frameworks, partials are components that can be plugged into a template (master). The difference in PHP frameworks the partial is independent of the template and can be used anywhere.

I guess it works quite similarly. I am going to try it out and update post. If it works i can PG to work with Codeigniter 4 easily. Only CI4 not CI3.

Thank you for your assistance. Will update post again.