A layout file is with everything that goes with a normal HTML page to do so. Layout files are used as a template to create new pages and with the extension. Tpl in /content/layouts stored.
Important! If no wildcard awarded and no menu and block files are created, the "Edit" does not appear in the Admin. If this behavior is desired, the variable set in the file "/settings/globalvars.php" $webutler_config['fullpageedit'] are set to 1, to move the "Edit Current Page" in the Admin. !!!
This new links appear automatically on all pages, menus can be stored in separate files. In order for a menu is loaded, the file name must be written with comment fields in the layout file or page. Format:
<!-- begin_menu_MENUFILEAME -->
<!-- menu_MENUFILENAME -->
<!-- end_menu_MENUFILENAME -->
Blocks are on offer, when a content on different pages to be displayed and you want to change this content centrally. The formatting is the same for the menus:
<!-- begin_block_BLOCKFILENAME -->
<!-- block_BLOCKFILENAME -->
<!-- end_block_BLOCKFILENAME -->
Content areas that are to be opened in the editor are enclosed in comments. Format:
<!-- begin_content -->
editable content
<!-- end_content -->
The comments should be of an HTML block element enclosed (best DIV) and may not be nested, eg a menu within <!-- begin_content --> and <!-- end_content -->.
All menus must be created as "Unordered List = UL", so that they can be edited with the intended functions of the editor!
You can mark areas in the editors or make them visible by assigning them CSS classes:
wb_menuelement - for menus
wb_blockelement - for blocks
wb_contentelement - for editable content
The classes must be assigned to an enclosing DIV. Other elements like SECTION, HEADER, FOOTER etc. are not supported.
If a custom error page is created, must include the following source for the error message in the file:
<?PHP echo $webutlercouple->errorpagetext; ?>
CSS classes must be assigned to the various page elements to ensure that new column elements can be inserted smoothly.
If you don't want to use the column elements, you can set the $webutler_config['insertcolumn'] variable to 0 in the /settings/globalvars.php file. Then only a DIV without formatting can be inserted using the editor. The DIV has the class "wb_baseelement".
One-column elements have class
wb_frameelement
multicolumn elements the class
wb_columnselement
New column elements can only be created outside of DIVs with the classes "wb_menuelement", "wb_blockelement", "wb_baseelement", "wb_frameelement", and "wb_columnselement"; be inserted. If the classes are not set, nesting could result that would make the administration unusable.
Under the menu item Page > Columns the new column element is configured. After the element has been selected, it can be inserted before or after any DIV in the page using one of the 5 CSS classes mentioned above. If none of the classes exist, no columns can be selected. The class wb_baseelement, wb_frameelement or wb_columnselement should therefore appear at least once in the page (or layout file).
Column settings such as spacing can be configured in the "columns.css" be made. It can be found under System > CSS & JS
All column elements marked with the class wb_frameelement or wb_columnselement can be edited and deleted. Elements with the class wb_baseelement can only be deleted.
When columns are inserted in the editor, they are marked with a gray border. Column elements can also be nested in this way. In globalvars.php it can also be set that columns can only be inserted in the editor.
Columns in the editor cannot be edited or can only be changed via the source text.
The menu item of the current page can be given a CSS class for a different look. If a nested menu is used, the class can also be assigned to the parent elements. If there are several menus to another class is possible for each menu.
Virtual directories can be created. Pages are assigned to a directory and the directory will appear in the URL. Directories are only visible in the URL.
Highlighting directories is very similar to highlighting parent elements in a nested menu, but establishes a connection between 2 separate menus.
Any number of sub-directories and sub-menus can be set.
Example:
1. There is a main menu with the menu item "Services", that calls the page "info.phtml".
2. On the page "info.phtml" there is a second menu with the pages "service1.phtml" and "service2.phtml".
Now if you want, that the menu item Services (page info.phtml) is highlighted when you're on the pages service1.phtml or service2.phtml. Simply set all 3 pages in a directory, for example "service", set a CSS class for the directory in the main menu and activate the checkbox "highlight current directory also".
Result:
If you call the page service1.phtml or service2.phtml from the second menu, the page info.phtml will be highlighted in the main menu.
If the checkbox "highlight current directory also" is not set, the page info.phtml will not be highlighted. Are the pages service1.phtml and service2.phtml are set in a sub-directory, eg "service/subservice", the checkbox must not be set and info.phtml, ie the directory "service" is highlighted.
Important! If in the same menu several pages use the same directory, all those pages are highlighted.
<script> ... </script> and <?PHP ... ?> code snippets may only be included in the <head> and <body> of a page. Code snippets outside of <head> and <body> are set mess validation in the editor.
With the variable $webutler_config['codeicon'] = "1" in globalvars.php code snippets can be visualized with icons. The icons do not always work smoothly! Icons are images and images are not valid at any place in the source code. If you have, for example, a list and want to control individual list items with PHP, the source code can look like this:
<ul>
<li>Item 1</li>
<?PHP if($a == 1) { ?><li>Item 2</li><?PHP } ?>
<li>Item 3</li>
</ul>
In the editor, the list looks like this:
• Item 1
[<>] • Item 2 [<>]
• Item 3
But the source is saved as:
<?PHP if($a == 1) { ?><?PHP } ?>
<ul>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
</ul>
As you can see, the code snippets has moved before the block element (UL). Default for $webutler_config['codeicon'] is 0. The variable should only be set to 1, if code snippets, seen as <img />, are valid in the source code.
The WEButler adds CSS and JS files to a single file and compresses them. All files that are entered into /settigs/compress.php are combined and compressed.
Stylesheet files are placed under the array key 'css',
Javascript files under the array key 'js'.
The compressed files are stored in /content/compress under the names styles.css and scripts.js.
The operation is automatically triggered when a file is opened and saved in the online editor. If you do not edit your files online, you can also manually initiate the process in the "Extended Administrator Functions" window, or set the variables compressor_onload_css and/or compressor_onload_js to 1 in the /settings/globalvars.php file for more time-consuming development.
Important! If paths (for example to image files) are present in the files, they must be adapted accordingly.
Files like CSS or Javascript can be automatically loaded into all pages. For this, the files must be in the "settings/extradata.php" be entered. Just copy the following lines into the file:
$webutler_autoheaderdata[] = '<meta name="designation" content="description" />';
$webutler_autofooterdata[] = '<script src="external_script.js"></script>';
If files are to be loaded on modules, the following can be put in the include file:
$webutlercouple->autoheaderdata[] = '<meta name="designation" content="description" />';
$webutlercouple->autofooterdata[] = '<script src="external_script.js"></script>';
Sometimes it is useful to know the file name of the last page, for example, redirects or as an alternative to "history.back()". But can to the session variable $_SESSION['history']['lastpage'] be accessed.
If user login administration is installed, the authentication information of the user in the session variable $_SESSION['userauth'] will be saved.
For multilingual pages can be retrieved using the session variable $_SESSION['language'], the language chosen by the visitors.