NAME

Maplat::Web::Themes - add theming support to your project

SYNOPSIS

Add pre-configures themes to your Maplat project.

DESCRIPTION

This module overrides the layout template configured in the TemplateCache module. It also adds a simple webmask, so each user can select his/her prefered theme.

Configuration is saved on a per-user basis through the usersettings-module. The default-theme is the first one configured. This overrides the default layout configured in the TemplateCache module.

Configuration

<module>
    <modname>themes</modname>
    <pm>Themes</pm>
    <options>
        <webpath>/settings/themes</webpath>
        <pagetitle>Themes</pagetitle>
        <usersettings>usersettings</usersettings>
        <view>
            <name>Classic</name>
            <template>magnalayout_classic</template>
            <screenshot>/pics/selectlayout_classic.png</screenshot>
            <description>The original. This is how this website is supposed to look! If you have problems, try using this theme before reporting a bug.</description>
        </view>
        <view>
            <name>Modern</name>
            <template>magnalayout_modern</template>
            <screenshot>/pics/selectlayout_modern.png</screenshot>
            <description>Similar in Look&amp;Feel to the new Intranet site.</description>
        </view>
        <view>
            <name>Typewriter</name>
            <template>magnalayout_typewriter</template>
            <screenshot>/pics/selectlayout_typewriter.png</screenshot>
            <description>Similar to classic, but with fixed width fonts and some other visual tweaks.</description>
        </view>
    </options>
</module>

get

Provides the configuration webinterface.

prerender

This hooks into the TemplateCache module with the prerender callback. It overrides the $webdata->{UserLayout} variable, forcing the TemplateCache module to use the Themes-configured template as layout instead of its internal default.

Dependencies

This module depends on the following modules beeing configured (the 'as "somename"' means the key name in this modules configuration):

Maplat::Web::UserSettings as "usersettings"

SEE ALSO

Maplat::Web Maplat::Web::UserSettings

AUTHOR

Rene Schickbauer, <rene.schickbauer@gmail.com>

COPYRIGHT AND LICENSE

Copyright (C) 2008-2010 by Rene Schickbauer

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.0 or, at your option, any later version of Perl 5 you may have available.