| ||
|
|
LayoutsLayouts are objects that define a whole page layout, and what blocks, menus, css, titles etc. are on that layout.menusThere a number of different Layout classes that each have different numbers of menus. 3 menus would be typically left, right and top. The Layout object itself then has fields for selecting which objects appear on which menus (they appear as links to the object with the object title). The Layout also has a field for the template, so you can then write a template that lays out all the html. You could put the menus wherever you like then (not just top,left,right), and uses any kind of dhtml etc. THE DEFAULT LAYOUTWhen a site is first installed a dafault layout is created and applied to the site.That layout is based on a template file /the-netwprl/engine-room/main-classes/1menu-layout-tpl.php This template name is called by new "one menu layouts To view that layout setting, call up a list of all "one Menu Layouts" here: http://dev.massmind.com/the-networ... To edit this template file copy it to NEWSITE/siteclasses/templates/yourtemplate.php You can put any named yourtemplate.php in this directory and then call that template from one of the Layout Admin Consoles Using Layout Admin Consoles1. decide which layout class you want to use How many menus will you need ? Can you use one of the existing classes or do you want to write a custom layout ? 2. create an instance 3. write your template "somefile.php" with your html design in it and put it in templates/somefile.php The body of whatever object is currently displaying will be available in your template as $body. Use one of the existing templates as a starting point. 4. edit the layout and specify that as your template : "somefile.php" It knows to look in templates. 5. follow the Main Site Settings link from your Admin Links and set the main site layout. (before doing that, you can preview the layout by going to its view page and clicking the preview link. very important if the site is already live !!) custom layouts for objectsWhen an object is viewed, its display() method is called, and that html is passed to the layout object that then makes a full webpage out of it with the menus, logos and advertising etc. There is one default site layout kept in the sites db table as defaultLayoutID. If that should fail to load (you deleted it etc.), a generic layout will be used. Certain objekt classes can choose to use their own layout based on their own criteria. One example is an article that looks up what section it is in and uses the section layout for its display. A blog page could choose to always display inside of its blog's specified layout. A Picture Gallery could take up the full screen A special login page could be small and in the center. So there is no limitation for how many layouts or what type of page layout a site must use as there are with many CMS systems. |
|