Skip to content

Correspondence Technologies

Sections
Personal tools
You are here: Home » Software » SfIndex Demo » collective - CMFUrlSkinSwitcher

Package: collective - CMFUrlSkinSwitcher

Provides an access rule for switching skins upon the location part of the url and methods generating absolute urls depending on the chosen skin.

a test of SfIndex product

Releases

Release Date Release Name Download
2004-06-09 15:00 CMFUrlSkinSwitcher-1_0rc1 sourceforge
2004-04-14 08:13 CMFUrlSkinSwitcher-0.9.0 sourceforge

Package README (CVS ver. 1.4)

CMFUrlSkinSwitcher Readme

    ### Important: You must enable the skin switcher manualy!!!
    ###    Go to ZMI --> you plone instance --> 'portal_skinswitcher'
    ###    --> 'skin switcher access rule enabled'.

    The CMFUrlSkinSwitcher provides an access rule for switching
    skins upon the location part of the url and methods generating
    absolute urls depending on the chosen skin.

    A description of the API can be found in 'interfaces.py'.
    The unit tests in 'tests/test_urlskinswitchertool.py' help in
    learning how to use the API.

    Tool Configuration

        To configure the CMFUrlSkinSwitcher visit the
        'portal_skinswitcher' tools 'Properties' tab.

        url regex to skin name mapping::

            <group>,<location reg exp>,<resulting skin name>

        skin switch mapping::

            <group>,<source skin>,<target skin>,<conversion reg
            exp>,<substitution reg exp>

        skin switcher access rule enabled::

            True/False

        The 'url regex to skin name mapping' is used at request time
        to decide which skin has to be chosen. The location part of
        the url is analyzed only.

        The 'skin switch mapping' is used to calculate the absolute
        url of an object depending on the chosen skin.

        The 'skin switcher access rule enabled' switch is to enable
        the skin switching in the access rule.

    Tool Default Configuration

        url regex to skin name mapping::

            0,(edit\..*)$,editor
            1,(localhost.*)$,visitor
            1,(127.0.0.1.*)$,editor
            0,(.*)$,visitor

        Locations like 'edit.example.com', 'edit.zope.ch',
        (both first line) and 'localhost' (second line) etc. switch
        to the 'editor' skin.

        Locations like '127.0.0.1' (third line), 'www.example.com' or
        'example.com' (both fourth line) switch to the 'visitor' skin.

        skin switch mapping::

            0,editor,visitor,edit\.(.*)$,www.\1
            0,visitor,editor,.*?\.?([^.]+\.{1}[^.]+)$,edit.\1
            1,editor,visitor,127.0.0.1(.*),localhost\1
            1,visitor,editor,localhost(.*),127.0.0.1\1

        When switching from the 'editor' to the 'visitor' skin
        the leading 'editor' subdomain gets snipped away and
        replaced by 'www'.

        When switching from the 'visitor' to the 'editor' skin
        any leading subdomain gets snipped away and replaced by
        'editor'.

        The third and fourth rule are used for switching skins
        on developer machines. 'localhost' and '127.0.0.1' are
        used to switch from one skin to another.

        skin switcher access rule enabled::

            False

        Disabled at install time making the access rule doing
        nothing. Must be enabled to be able to switch between
        skins.


    Apache Rewrite Rule Configuration

        XXX to be done


    Have a look also at the following documents:

        - INSTALL.txt: Instructions how to install CMFUrlSkinSwitcher

        - DEPENDENCIES.txt: Informations about dependencies to other
          pieces of software

        - CHANGES.txt: Changes made since the previous version

        - ROADMAP.txt: Feature Roadmap

        - LICENSE.txt: The GPL license text

    Please report bugs, your ideas, etc. to:

        gregweb *at* dplanet *dot* ch


-----------------------------------------------------------------------
$Source: /cvsroot/collective/CMFUrlSkinSwitcher/README.txt,v $
$Id: README.txt,v 1.4 2004/06/10 12:18:24 gregweb Exp $
 

Powered by Plone

This site conforms to the following standards: