How to use Master Pages
RocketCake has a built- in feature named Master Pages, a simple mechanism to share parts of the website between
different pages. If you have a lot of web pages with repeating design, it might be easier to just design the layout once and reuse it on all pages which have actual content. This section will show how to do this.
First, create some design layout page for your website. Name it for example 'masterpage.html' to be sure you don't confuse it with a real page. As example, create a menu and some caption on it, like this:
This will now be the base for all pages, and we only will change the text content on every page. To let RocketCake know which part of the website should change, add a 'Content Placeholder' on the page. You can find it in the menu item 'Insert -> More -> Content Placeholder' or on the second page of the toolset on the right:
Place it where your website content should be displayed:
Note: Without the placeholder, Master Pages won't work.
Now, we only need to add one or two pages with content to use this master page. Add a new, empty page to the project, and fill it with some text and content:
The only thing missing is now to tell RocketCake to use the Master Page for this page. In the Properties window, go to the 'Master Page' option, and check it. A new entry will appear where you will be able to select a page as master page. Select the masterpage.html we created before:
And basically, that's it. If you now publish or preview the page, it should appear as part of the master page, exactly where you placed the content placeholder:
You can create as many pages as you want which all can use the Master Page. In this way, you only have one page containing the layout, which you only need to edit once.
Copyright © by Ambiera e.U.