New Layouts and layout mapping
There are three ways to specify a new layout, or a new layout like appearance.
-
New XML layout definitions
The default layout is defined in ..../layouts/robo.xml
You can make a new layout definition, perhaps named something like honeyBucket.xml, which defines the nested hierarchy of HTML block elements that make up the page. Each block element whose content comes from a plugin must have an "id" and a "src" attribute.
<div id="main-disp" src="whatEver"/> ...for instance, where src="whatEver" means "use the /plugins/whatEver.php plugin to supply content to the division whose id is main-disp.
In example sited above honeyBucket.xml allows you to specify which CSS files to use. CSS files are stored in the ../css directory. Study /layouts/robo.xml to see how it's done. To invoke a new and not-default layout a link can be made whose URL looks like this:
http://localhost/gallery&layout=honeyBucket
-
Mapping XML layout definitions to all files recursively an entire directory tree
conf/dirlayouts.ini
gallery|honeyBucket
If the conf/dirlayouts.ini file contained a like like the one above, then all pages generated from the contents of the /fragments/gallery directory would use the layouts/honeyBucket.xml layout definition to generate the pages.
-
Mapping XML layout definitions to all files in the current directory
You can map gallery.xml layout to all pages in a directory named Birds (but not to sub-directories of Birds)
by creating a files named
/fragments/path1/path2/Birds/roboresources/layout
whose contents is the word "gallery"
-
Mapping XML layout definitions to an individual page
Let's say all pages in the Birds directory use the gallery.xml layout
with one exception. Perhaps you want Vultures.htm to be a page that
reverts to robo.cml
careate a file named /fragments/path1/path2/Birds/roboresources/Vultures.htm_layout
whose contents is the word "robo"
by creating a files named
/fragments/path1/path2/Birds/roboresources/layout
whose contents is the word "gallery"
-
Dynamic, Layout Modificationss
Perhaps the default robo.xml layout definition specifies the content for a division whose id is "nav" will normally be generated by a plugin named /plugins/dynamicNavigation.xml. The content for the nav division can be changed on the fly with a custom URL attribute. Let's say we wanted to change the content from dynamicNavigation.php to file.php for one or more specific pages. You could do that with a URL like the following:
http://localhost?page=subdir1/subdir2&nav=file
23,1 Bot