-
Notifications
You must be signed in to change notification settings - Fork 25
/
index.html
75 lines (64 loc) · 3.45 KB
/
index.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
---
layout: default
navPage: docs
heading: Theme Development
breadcrumbs:
- Theme Development
next: The Default Theme,/theme_development/default_theme/
categories: theme_development
page_type: introduction
---
{% include open_section.html nav='nav_theme_development.html' selected='theme_development' nav_width=4 %}
<p>
This section is for people interested in customizing the look and feel of Form Tools.
The most important thing you need to know about is <i>smarty</i>.
</p>
<h3>Smarty!</h3>
<p>
All HTML content in Form Tools is generated via <a href="http://smarty.net">Smarty Templates</a>.
Smarty is a web application that's bundled with Form Tools. With Form Tools 2, instead of
constructing the HTML in PHP, Smarty helps remove the HTML (and other dynamic content) into separate files
that contain Smarty placeholders and logic. The template is then called and processed from within the Core
code, resulting in a final webpage or whatever content is needed.
</p>
<p>
Smarty is used not just for the HTML webpages, but the emails content (HTML + text),
language file strings - virtually everything. The benefits to using Smarty are too many
to enumerate: it's fundamentally a better approach that the previous method of
intermingling the HTML and PHP. What's more, we didn't just use Smarty for our own
convenience: this decision affects all users of Form Tools - be they theme developers,
module developers or just administrators constructing emails through the Form Tools UI.
It makes <b>everyone's</b> job easier.
</p>
<p>
But the primary, original purpose of using Smarty was to allow Form Tools to be skinned
with themes. The last of customizability of the Form Tools 1 UI was a significant
drawback. We included some simple options to define the CSS and main image, but it was
very basic. The new theme-based approach has no limitations.
</p>
<p>
Themes encompass the visual presentation of the entire script: client pages,
administrator pages, modules pages alike. It was designed to be easily extended, letting
you create your own themes <b>very</b> quickly. This can be invaluable if you need to skin
the UI for a client, making it look consistent with their own website. As with Form Tools
1.x, Form Tools 2 is completely brandable: we don't make you include links to our
website or even mention we wrote the thing. Two thumbs up for open source!
</p>
<h3>Themes + Overriding Pages</h3>
<p>
Themes work by overriding pages already defined in the default theme. The default theme
(discussed next) contains all theme pages needs to display the entire Form Tools
application. Other themes work by <b>only</b> overriding those pages required for whatever
type of presentation you have in mind. This keeps themes as small as possible, and makes
the increasingly likely of being compatible with future versions of the script.
</p>
<p>
On that note, generally it's a good idea to only override the main "special" templates
(discussed later) not individual pages within the Form Tools UI. This is because future
versions of the script are apt to make changes to individual pages, whereas the core pages
are more probable to remain unchanged. But even if you do need to do this, no problem! The
Form Tools website logs different versions of your theme for you, so you can map specific
versions to particular versions of the Form Tools Core, ensuring your theme works in all
cases.
</p>
{% include close_section.html %}