Tutorial #6: LayoutsThis tutorial puts it all together and shows you how to lay out a basic home page. About LayoutsLayouts are basically templates that you can plug content into. You have noticed that when you create your own pages, you have used the “secondary page” layout. Layouts have page parts associated with them. On your test page, you edited the “body” page part. However, a page can have as many page parts as you would like. The layout then places the content in the page parts in each area on the page, in an area specific to that layout. For example, this page you are looking at uses the “Left Sidebar” layout. The “body” page part is what you are reading right now. There is another page part called “sidebar”. The sidebar contains the tutorial links on the left of this page. Because the sidebar is the same on each page in the tutorial, we use a reusable snippet that contains those links. This tutorial puts everything you have learned together to create a page that has a left sidebar, like this one, and a photo in the upper right. You can use this as a template for your own home page. Getting readyBefore we lay out the page, do the following:
Laying out the page
Creating your own layoutsCreating your own layouts requires some knowledge of HTML. Or, if you’re brave you can look at the content in some of the existing layouts, copy it into your new layout, and modify it. The key thing to know about creating layouts is how to put page parts into them. This is done with the following tag: <content part=”part-name”/> The part-name is the name of the page part that goes into that section of the layout. Whatever content is entered into that page part gets inserted where the content tag is. Look at some of the existing layouts for examples of these. |
|