<?xml version="1.0"?>
<config>
    <frontend>
        <events>
            <controller_action_predispatch>
                <observers>
                    <theme_designer_model_observer>
                        <type>singleton</type>
                        <class>Theme_Designer_Model_Observer</class>
                        <method>controller_action_predispatch</method>
                    </theme_designer_model_observer>
                </observers>
            </controller_action_predispatch>
            <cms_page_render>
                <observers>
                    <theme_designer_model_observer>
                        <type>singleton</type>
                        <class>Theme_Designer_Model_Observer</class>
                        <method>cms_page_render</method>
                    </theme_designer_model_observer>
                </observers>
            </cms_page_render>
            <controller_action_layout_render_before>
                <observers>
                    <theme_designer_model_observer>
                        <type>singleton</type>
                        <class>Theme_Designer_Model_Observer</class>
                        <method>controller_action_layout_render_before</method>
                    </theme_designer_model_observer>
                </observers>
            </controller_action_layout_render_before>
        </events>
        <layout>
            <updates>
                <billionthemler>
                    <file>designer.xml</file>
                </billionthemler>
            </updates>
        </layout>
    </frontend>
    <modules>
        <Theme_Designer>
            <version>0.1.0</version>
        </Theme_Designer>
    </modules>
    <global>
        <helpers>
            <designer>
                <class>Theme_Designer_Helper</class>
            </designer>
        </helpers>
        <blocks>
            <designer>
                <class>Theme_Designer_Block</class>
            </designer>
        </blocks>
        <models>
            <designer>
                <class>Theme_Designer_Model</class>
                <resourceModel>designer_resource</resourceModel>
            </designer>
            <core>
                <rewrite>
                    <url>Theme_Designer_Model_Url</url>
                </rewrite>
            </core>
        </models>
        <resources>
            <designer_setup>
                <setup>
                    <module>Theme_Designer</module>
                </setup>
                <connection>
                    <use>core_setup</use>
                </connection>
            </designer_setup>
            <designer_write>
                <connection>
                    <use>core_write</use>
                </connection>
            </designer_write>
            <designer_read>
                <connection>
                    <use>core_read</use>
                </connection>
            </designer_read>
        </resources>
        <cache>
            <types>
                <designer module="designer" translate="label description">
                    <label>Theme Designer Cache</label>
                    <description>Theme Designer Cache</description>
                    <tags>THEME_DESIGNER</tags>
                </designer>
            </types>
        </cache>
    </global>
    <admin>
        <routers>
            <designer>
                <use>admin</use>
                <args>
                    <module>Theme_Designer</module>
                    <frontName>designer</frontName>
                </args>
            </designer>
        </routers>
    </admin>
    <adminhtml>
        <menu>
            <designer module="designer">
                <title>Billion Themes</title>
                <sort_order>100</sort_order>
                <action>designer/adminhtml_list</action>
            </designer>
        </menu>
        <acl>
            <resources>
                <all>
                    <title>Allow Everything</title>
                </all>
                <admin>
                    <children>
                        <designer translate="title" module="designer">
                            <title>Designer</title>
                            <sort_order>1000</sort_order>
                            <children>
                                <index translate="title">
                                    <title>Designer</title>
                                </index>
                            </children>
                        </designer>
                    </children>
                </admin>
            </resources>
        </acl>
        <layout>
            <updates>
                <designer>
                    <file>designer.xml</file>
                </designer>
            </updates>
        </layout>
    </adminhtml>

    <phpunit>
        <suite>
            <modules>
                <Theme_Designer />
            </modules>
        </suite>
    </phpunit>
</config> 