Home : Digital Asset Management : OE Toolbar : Editing the Layout : Layouts
Layouts
A typical OpenEdit site will have a layout.html file that provides a template for common elements (e.g. the header, sidebar menus, and footer). The OpenEdit layout engine automatically merges each pages' content with the page's associated layout(s) such that a single HTML page is generated.
Most layout files contain complex dynamic content and specialized code, and thus are not usually editable using the OpenEdit online editor. They can be editied directly using the File Manager.
Most of the time a layout for a site stored in the /layout directory, and named layout.html.
Layout features:
1. $pages.stream("/menu.html") This pulls in a menu page into the layout. We encourage the use of included files like this one so that edits can be made in small parts. If menu.html has an editable property of true then it also would have a pencil and edit ability.
2. <title>$!content.title</title>
A $content represents the page that the user is looking at. For example /index.html would be a content page. The layout will pull the title for a page from a property in the xconf files. The property needs to be named "title" for example:
<property name="title">Welcome!</property>
3. $pages.streamContent() This is the place that the layout will put in the content page or inner layouts. Inner layouts can be specified by the content page using this tag in an xconf file:
<inner-layout>/innerlayout.html</inner-layout>
Once all inner layouts have rendered their own inner layouts the content of the page will be rendered.
Best Practice
We recommend you have these files for a site:/_site.xconf - This is the standard set of configurations.
/_default.xconf - This specifies an inner layout and maybe a title for this section
/layout.html - This contains the HEAD and footer portions of the site design. It might also include a special side menu, image or Velocity programming logic that is specific for these pages.
/menu.html - This is a typical include to handle site navigation.
