GithubHelp home page GithubHelp logo

wh_theme_settings's Introduction

##wh_theme_settings

OXID module enabling the use of a "settings" section in theme metadata files (theme.php in the theme's root folder).

The general idea is to make it easier to manage a theme's settings during development instead of adding them to the database manually.

Note: to make changes apparent for edited theme.php files, activate a different theme and re-activate the original theme so that the data for new configuration variables is written to the database.

Note 2: Viewing the theme settings for a theme that has not been activated before will display empty settings.

The behaviour and syntax is identical to that of modules.

Syntax example for the "azure" module:

// Settings section in theme.php for the 'azure' OXID eShop theme
'settings' => array(
    array('group' => 'images',          'name' => 'sManufacturerIconsize',          'type' => 'str',    'constraints' => '',                    'value' => '100*100'),
    array('group' => 'images',          'name' => 'sCatIconsize',                   'type' => 'str',    'constraints' => '',                    'value' => '168*100'),
    array('group' => 'images',          'name' => 'sCatPromotionsize',              'type' => 'str',    'constraints' => '',                    'value' => '370*107'),
    array('group' => 'images',          'name' => 'sIconsize',                      'type' => 'str',    'constraints' => '',                    'value' => '87*87'),
    array('group' => 'images',          'name' => 'sThumbnailsize',                 'type' => 'str',    'constraints' => '',                    'value' => '185*150'),
    array('group' => 'images',          'name' => 'sCatThumbnailsize',              'type' => 'str',    'constraints' => '',                    'value' => '748*150'),
    array('group' => 'images',          'name' => 'sZoomImageSize',                 'type' => 'str',    'constraints' => '',                    'value' => '665*665'),
    array('group' => 'images',          'name' => 'aDetailImageSizes',              'type' => 'aarr',   'constraints' => '',                    'value' => array(
                                                                                                                                                                'oxpic1' => '380*340',
                                                                                                                                                                'oxpic2' => '380*340',
                                                                                                                                                                'oxpic3' => '380*340',
                                                                                                                                                                'oxpic4' => '380*340',
                                                                                                                                                                'oxpic5' => '380*340',
                                                                                                                                                                'oxpic6' => '380*340',
                                                                                                                                                                'oxpic7' => '380*340',
                                                                                                                                                                'oxpic8' => '380*340',
                                                                                                                                                                'oxpic9' => '380*340',
                                                                                                                                                                'oxpic10' => '380*340',
                                                                                                                                                                'oxpic11' => '380*340',
                                                                                                                                                                'oxpic12' => '380*340',
                                                                                                                                                            )
    ),
    array('group' => 'features',        'name' => 'bl_showCompareList',             'type' => 'bool',   'constraints' => '',                    'value' => '1'),
    array('group' => 'features',        'name' => 'bl_showListmania',               'type' => 'bool',   'constraints' => '',                    'value' => '1'),
    array('group' => 'features',        'name' => 'bl_showWishlist',                'type' => 'bool',   'constraints' => '',                    'value' => '1'),
    array('group' => 'features',        'name' => 'bl_showVouchers',                'type' => 'bool',   'constraints' => '',                    'value' => '1'),
    array('group' => 'features',        'name' => 'bl_showGiftWrapping',            'type' => 'bool',   'constraints' => '',                    'value' => '1'),
    array('group' => 'display',         'name' => 'blShowBirthdayFields',           'type' => 'bool',   'constraints' => '',                    'value' => '1'),
    array('group' => 'display',         'name' => 'iTopNaviCatCount',               'type' => 'str',    'constraints' => '',                    'value' => '4'),
    array('group' => 'display',         'name' => 'sDefaultListDisplayType',        'type' => 'select', 'constraints' => 'infogrid|line|grid',  'value' => 'infogrid'),
    array('group' => 'display',         'name' => 'sStartPageListDisplayType',      'type' => 'select', 'constraints' => 'infogrid|line|grid',  'value' => 'infogrid'),
    array('group' => 'display',         'name' => 'blShowListDisplayType',          'type' => 'bool',   'constraints' => '',                    'value' => '1'),
    array('group' => 'display',         'name' => 'iNewBasketItemMessage',          'type' => 'select', 'constraints' => '0|1|2|3',             'value' => '1'),
    array('group' => 'display',         'name' => 'aNrofCatArticles',               'type' => 'arr',    'constraints' => '',                    'value' => array('10', '20', '50', '100')),
    array('group' => 'display',         'name' => 'aNrofCatArticlesInGrid',         'type' => 'arr',    'constraints' => '',                    'value' => array('12', '16', '24', '32')),
),

wh_theme_settings's People

Contributors

whefter avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.