Writing a new template
If you've just started a new project, you'll probably want a custom template for it.
Just create the following directory stucture for your template:
/Templates//Template/Default.tpl - This is a main template.
/Templates//Css/Default.css - This is the main css file.
/Templates//Css/Content.css - This is the WYSIWYG editor's CSS file, that is loaded in every page and populates custom style combobox.
/Templates//Images/* - Here you can place your custom images, dedicated for this project.
/Templates//Fonts/*.ttf - Here you can place your custom fonts, that will enable you to generate custom GIF images with thos fonts from dynamic content using weblancet_textimage smarty block.
/Templates//Translation - Here are your project translation files fetched. This directory must be writable by web server process, because it can be synchronyzed by WebLancet.
The optional directories are:
/Templates//Component
/Templates//Class
/Templates//Smarty
Here you can override ANY template file or ANY php class from main catalog. That means that if you want any custom behaviour or custom look for any administration/configuration component, just copy the file from main catalog to your template directory, if you are overriding php class do not forget to run Tools/LinkAll.php and modify your code freely!
This is the basic template to start with:
{assign var="menu" value=$view->getComponentView('Menu', 'Default')}
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title><Your-Project-Name> | {$view->slots.Title}</title>
<link href="/Templates/<Your-Project>/Css/Default.css" rel="stylesheet" type="text/css" >
<link href="/Templates/<Your-Project>/Css/Content.css" rel="stylesheet" type="text/css">
{weblancet_jquery view=$view}
{/weblancet_jquery}
</head>
<body>
<div id="base">{weblancet_tools}
<div class="menu">{$menu->getContent()}</div>
<div class="content">{$view->slots.MainContent}</div>
</div>
{weblancet_analytics}
</body>
</html>
You'll have the basic functionality with such a template - default administrator's menu (if logged in), website menu and main content window. Feel free to add any images, CSS files or anything else to this template.