Actions
Theming » History » Revision 1
Revision 1/4
| Next »
Ward Vandewege, 01/28/2014 08:54 PM
Theming¶
Tapestry uses four layouts (i.e. themes) throughout the application.
These layouts are defined in the
config/config.defaults.yml
file as
# Layouts application_layout: 'tapestry_default' application_layout_exam: 'tapestry_default_exam' application_layout_gmaps: 'tapestry_default_gmaps' application_layout_mobile: 'tapestry_default_mobile'
The values of these fields mean that these layout files are used in the default Tapestry installation:
app/views/layouts/tapestry_default.html.erb app/views/layouts/tapestry_default_exam.html.erb app/views/layouts/tapestry_default_gmails.html.erb app/views/layouts/tapestry_default_mobile.html.erb
To start creating a custom theme, add the layout fields to your
config/config.yml
file and give them new values, for instance:
# Layouts application_layout: 'my_site' application_layout_exam: 'my_site_exam' application_layout_gmaps: 'my_site_gmaps' application_layout_mobile: 'my_site_mobile'
Then copy the default layout files to
app/views/layouts/my_site.html.erb app/views/layouts/my_site_exam.html.erb app/views/layouts/my_site_gmails.html.erb app/views/layouts/my_site_mobile.html.erb
and edit them as you see fit.
Updated by Ward Vandewege almost 11 years ago · 4 revisions