-
Notifications
You must be signed in to change notification settings - Fork 26
/
modules.html
47 lines (40 loc) · 1.69 KB
/
modules.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
---
layout: default
navPage: docs
heading: Modules
breadcrumbs:
- Theme Development,/theme_development/
- Modules
prev: Cache Files,/theme_development/cache_files/
next: The /about folder,/theme_development/about_folder/
categories: theme_development
---
{% include open_section.html nav='nav_theme_development.html' selected='modules' nav_width=4 %}
<p>
Modules are special. Since you, the theme developer, cannot know what modules will be used
by each Form Tools installation, you can hardly be expected to provide templates for
each and every one - including those that aren't written yet!
</p>
<p>
Instead, skinning modules work like so: your job is to develop three special templates:
modules_header.tpl, modules_footer.tpl and module_menu.tpl. These three templates do the job
of rendering important areas of the module pages for ALL modules, namely: the header HTML,
footer HTML and the presentation of the module navigation menu.
</p>
<p>
The actual job of creating the Smarty templates for each module is left to the module
developer. They create whatever pages they need - and they then include the three files
appropriately.
</p>
<p>
The benefits to this approach should be pretty clear: the resulting UI will be largely
consistent between the main Form Tools pages and each module. To further reinforce this
consistency, the Form Tools core contains a CSS file which should be included in ALL
template pages - including your modules_header.tpl file. This lets module developers
rely on those rules always being defined. Mostly the file just includes padding, margin
and colour rules. See:
</p>
<p>
<b>/global/css/main.css</b>
</p>
{% include close_section.html %}