Index: /quintagroup.seoptimizer/trunk/quintagroup/seoptimizer/Extensions/Install.py
===================================================================
--- /quintagroup.seoptimizer/trunk/quintagroup/seoptimizer/Extensions/Install.py	(revision 1569)
+++ /quintagroup.seoptimizer/trunk/quintagroup/seoptimizer/Extensions/Install.py	(revision 1570)
@@ -2,4 +2,15 @@
 from quintagroup.seoptimizer.config import PROJECT_NAME
 
+def install(portal, reinstall=False):
+    setup_tool = getToolByName(portal, 'portal_setup')
+    setup_tool.setBaselineContext('profile-%s:uninstall'%PROJECT_NAME)
+    if reinstall:
+        setup_tool.setBaselineContext('profile-%s:reinstall'%PROJECT_NAME)
+        setup_tool.runAllImportStepsFromProfile('profile-%s:reinstall'%PROJECT_NAME)
+        return "Ran reinstall steps."
+    else:
+        setup_tool.setBaselineContext('profile-%s:uninstall'%PROJECT_NAME)
+        setup_tool.runAllImportStepsFromProfile('profile-%s:default'%PROJECT_NAME)
+        return "Ran all install steps."
 
 def uninstall(portal, reinstall=False):
Index: /quintagroup.seoptimizer/trunk/quintagroup/seoptimizer/browser/templates/seo_controlpanel.pt
===================================================================
--- /quintagroup.seoptimizer/trunk/quintagroup/seoptimizer/browser/templates/seo_controlpanel.pt	(revision 1569)
+++ /quintagroup.seoptimizer/trunk/quintagroup/seoptimizer/browser/templates/seo_controlpanel.pt	(revision 1570)
@@ -96,5 +96,5 @@
                                                 tal:attributes="id name;
                                                                 value name;
-                                                                checked python:view.isEnableCT(name)"/>
+                                                                checked python:view.hasSEOAction(type)"/>
                                         <label tal:attributes="for python:type.getId()"
                                                tal:content="type/Title"/>
Index: /quintagroup.seoptimizer/trunk/quintagroup/seoptimizer/browser/views.py
===================================================================
--- /quintagroup.seoptimizer/trunk/quintagroup/seoptimizer/browser/views.py	(revision 1569)
+++ /quintagroup.seoptimizer/trunk/quintagroup/seoptimizer/browser/views.py	(revision 1570)
@@ -211,11 +211,4 @@
         """
         return filter(lambda x:x.id == 'seo_properties', type_info.listActions())
-
-
-    def isEnableCT(self, type_id):
-        """
-        """
-        seo_props = getToolByName(self.portal_properties, 'seo_properties')
-        return type_id in seo_props.getProperty('content_types_seoprops_enabled', '')
 
     def test( self, condition, first, second ):
Index: /quintagroup.seoptimizer/trunk/quintagroup/seoptimizer/configure.zcml
===================================================================
--- /quintagroup.seoptimizer/trunk/quintagroup/seoptimizer/configure.zcml	(revision 1569)
+++ /quintagroup.seoptimizer/trunk/quintagroup/seoptimizer/configure.zcml	(revision 1570)
@@ -17,4 +17,12 @@
       directory="profiles/default"
       description="Install quintagroup.seoptimizer"
+      provides="Products.GenericSetup.interfaces.EXTENSION"
+      />
+
+  <genericsetup:registerProfile
+      name="reinstall"
+      title="quintagroup.seoptimizer reinstall"
+      directory="profiles/reinstall"
+      description="Reinstall quintagroup.seoptimizer"
       provides="Products.GenericSetup.interfaces.EXTENSION"
       />
Index: /quintagroup.seoptimizer/trunk/quintagroup/seoptimizer/profiles/default/propertiestool.xml
===================================================================
--- /quintagroup.seoptimizer/trunk/quintagroup/seoptimizer/profiles/default/propertiestool.xml	(revision 1569)
+++ /quintagroup.seoptimizer/trunk/quintagroup/seoptimizer/profiles/default/propertiestool.xml	(revision 1570)
@@ -85,9 +85,4 @@
    <element value="distribution seo_distribution"/>
   </property>
-  <property name="content_types_seoprops_enabled" type="lines" purge='False'>
-   <element value="Document"/>
-   <element value="File"/>
-   <element value="News Item"/>
-  </property>
  </object>
  <object name="site_properties" meta_type="Plone Property Sheet">
Index: /quintagroup.seoptimizer/trunk/quintagroup/seoptimizer/profiles/reinstall/browserlayer.xml
===================================================================
--- /quintagroup.seoptimizer/trunk/quintagroup/seoptimizer/profiles/reinstall/browserlayer.xml	(revision 1570)
+++ /quintagroup.seoptimizer/trunk/quintagroup/seoptimizer/profiles/reinstall/browserlayer.xml	(revision 1570)
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<layers
+   xmlns:i18n="http://xml.zope.org/namespaces/i18n"
+   i18n:domain="seoptimizer">
+   <layer name="qSEOptimizer"
+          interface="quintagroup.seoptimizer.browser.interfaces.IPloneSEOLayer" />
+</layers>
Index: /quintagroup.seoptimizer/trunk/quintagroup/seoptimizer/profiles/reinstall/import_steps.xml
===================================================================
--- /quintagroup.seoptimizer/trunk/quintagroup/seoptimizer/profiles/reinstall/import_steps.xml	(revision 1570)
+++ /quintagroup.seoptimizer/trunk/quintagroup/seoptimizer/profiles/reinstall/import_steps.xml	(revision 1570)
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<import-steps>
+ <import-step id="seo_reinstall" version="20081125-01"
+              handler="quintagroup.seoptimizer.setuphandlers.reinstall"
+              title="SEO reinstallation">
+  SEO reinstallation
+ </import-step>
+</import-steps>
Index: /quintagroup.seoptimizer/trunk/quintagroup/seoptimizer/profiles/reinstall/jsregistry.xml
===================================================================
--- /quintagroup.seoptimizer/trunk/quintagroup/seoptimizer/profiles/reinstall/jsregistry.xml	(revision 1570)
+++ /quintagroup.seoptimizer/trunk/quintagroup/seoptimizer/profiles/reinstall/jsregistry.xml	(revision 1570)
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<object name="portal_javascripts" meta_type="JavaScripts Registry">
+    <javascript cacheable="true" compression="safe" cookable="true"
+        enabled="true" expression="" id="++resource++seo_custommetatags.js" inline="false"/>
+    <!--javascript cacheable="true" compression="safe" cookable="true"
+        enabled="true" expression="" id="++resource++checkkeywords.js.dtml" inline="false"/>
+    <javascript cacheable="true" compression="safe" cookable="true"
+        enabled="true" expression="" id="++resource++statistics.js.dtml" inline="false"/-->
+</object>
Index: /quintagroup.seoptimizer/trunk/quintagroup/seoptimizer/profiles/reinstall/metadata.xml
===================================================================
--- /quintagroup.seoptimizer/trunk/quintagroup/seoptimizer/profiles/reinstall/metadata.xml	(revision 1570)
+++ /quintagroup.seoptimizer/trunk/quintagroup/seoptimizer/profiles/reinstall/metadata.xml	(revision 1570)
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<metadata>
+  <version>2.2.0</version>
+</metadata>
Index: /quintagroup.seoptimizer/trunk/quintagroup/seoptimizer/profiles/reinstall/skins.xml
===================================================================
--- /quintagroup.seoptimizer/trunk/quintagroup/seoptimizer/profiles/reinstall/skins.xml	(revision 1570)
+++ /quintagroup.seoptimizer/trunk/quintagroup/seoptimizer/profiles/reinstall/skins.xml	(revision 1570)
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<object name="portal_skins">
+ <object name="quintagroup.seoptimizer" meta_type="Filesystem Directory View"
+    directory="quintagroup.seoptimizer:skins/quintagroup.seoptimizer"/>
+</object>
Index: /quintagroup.seoptimizer/trunk/quintagroup/seoptimizer/profiles/reinstall/types/Document.xml
===================================================================
--- /quintagroup.seoptimizer/trunk/quintagroup/seoptimizer/profiles/reinstall/types/Document.xml	(revision 1570)
+++ /quintagroup.seoptimizer/trunk/quintagroup/seoptimizer/profiles/reinstall/types/Document.xml	(revision 1570)
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<object name="Document" meta_type="Factory-based Type Information with dynamic views"
+   i18n:domain="quintagroup.seoptimizer"  xmlns:i18n="http://xml.zope.org/namespaces/i18n">
+ <action title="SEO Properties" action_id="seo_properties" category="object" condition_expr="python:exists('portal/@@seo-context-properties')"
+    url_expr="string:${object_url}/@@seo-context-properties" visible="True"
+    i18n:attributes="">
+  <permission value="Modify portal content"/>
+ </action>
+</object>
Index: /quintagroup.seoptimizer/trunk/quintagroup/seoptimizer/profiles/reinstall/types/File.xml
===================================================================
--- /quintagroup.seoptimizer/trunk/quintagroup/seoptimizer/profiles/reinstall/types/File.xml	(revision 1570)
+++ /quintagroup.seoptimizer/trunk/quintagroup/seoptimizer/profiles/reinstall/types/File.xml	(revision 1570)
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<object name="File" meta_type="Factory-based Type Information with dynamic views"
+   i18n:domain="quintagroup.seoptimizer"  xmlns:i18n="http://xml.zope.org/namespaces/i18n">
+ <action title="SEO Properties" action_id="seo_properties" category="object" condition_expr="python:exists('portal/@@seo-context-properties')"
+    url_expr="string:${object_url}/@@seo-context-properties" visible="True"
+    i18n:attributes="">
+  <permission value="Modify portal content"/>
+ </action>
+</object>
Index: /quintagroup.seoptimizer/trunk/quintagroup/seoptimizer/profiles/reinstall/types/News_Item.xml
===================================================================
--- /quintagroup.seoptimizer/trunk/quintagroup/seoptimizer/profiles/reinstall/types/News_Item.xml	(revision 1570)
+++ /quintagroup.seoptimizer/trunk/quintagroup/seoptimizer/profiles/reinstall/types/News_Item.xml	(revision 1570)
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<object name="News Item" meta_type="Factory-based Type Information with dynamic views"
+   i18n:domain="quintagroup.seoptimizer"  xmlns:i18n="http://xml.zope.org/namespaces/i18n">
+ <action title="SEO Properties" action_id="seo_properties" category="object" condition_expr="python:exists('portal/@@seo-context-properties')"
+    url_expr="string:${object_url}/@@seo-context-properties" visible="True"
+    i18n:attributes="">
+  <permission value="Modify portal content"/>
+ </action>
+</object>
Index: /quintagroup.seoptimizer/trunk/quintagroup/seoptimizer/profiles/reinstall/viewlets.xml
===================================================================
--- /quintagroup.seoptimizer/trunk/quintagroup/seoptimizer/profiles/reinstall/viewlets.xml	(revision 1570)
+++ /quintagroup.seoptimizer/trunk/quintagroup/seoptimizer/profiles/reinstall/viewlets.xml	(revision 1570)
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<object>
+  <order manager="plone.htmlhead" skinname="*">
+    <viewlet name="plone.htmlhead.title" />
+    <viewlet name="quintagroup.seoptimizer.customscript" />
+    <viewlet name="plone.resourceregistries" />
+  </order>
+</object>
Index: /quintagroup.seoptimizer/trunk/quintagroup/seoptimizer/setuphandlers.py
===================================================================
--- /quintagroup.seoptimizer/trunk/quintagroup/seoptimizer/setuphandlers.py	(revision 1569)
+++ /quintagroup.seoptimizer/trunk/quintagroup/seoptimizer/setuphandlers.py	(revision 1570)
@@ -9,12 +9,8 @@
     new = '@@seo-context-properties'
     condition = "python:exists('portal/@@seo-context-properties')"
-    seo_props = site.portal_properties.seo_properties
-    content_types_seoprops_enabled = list(seo_props.getProperty('content_types_seoprops_enabled'))
     for ptype in site.portal_types.objectValues():
         acts = filter(lambda x: x.id == 'seo_properties' , ptype.listActions())
         for act in acts:
             log = 0
-            if ptype.id not in content_types_seoprops_enabled:
-                content_types_seoprops_enabled.append(ptype.id)
             if not act.condition:
                 act.condition = Expression(condition)
@@ -26,14 +22,4 @@
             if log:
                 logger.log(logging.INFO, "Updated \"SEO Properties\" action in %s type." % ptype.id)
-    seo_props.manage_changeProperties(content_types_seoprops_enabled=tuple(content_types_seoprops_enabled))
-
-
-def importVarious(context):
-    """ Do customized installation.
-    """
-    if context.readDataFile('seo_install.txt') is None:
-        return
-    site = context.getSite()
-    migrationActions(site)
 
 def removeSkin(self, layer):
@@ -65,5 +51,5 @@
                 logger.log(logging.INFO, "Deleted \"SEO Properties\" action for %s type." % ptype.id)
 
-def remove_configlets( context, conf_ids ):
+def remove_configlets(context, conf_ids):
     """ Remove configlets.
     """
@@ -74,5 +60,19 @@
             logger.log(logging.INFO, "Unregistered \"%s\" configlet." % id)
 
-def uninstall( context ):
+def importVarious(context):
+    """ Do customized installation.
+    """
+    if context.readDataFile('seo_install.txt') is None:
+        return
+
+def reinstall(context):
+    """ Do customized reinstallation.
+    """
+    if context.readDataFile('seo_reinstall.txt') is None:
+        return
+    site = context.getSite()
+    migrationActions(site)
+
+def uninstall(context):
     """ Do customized uninstallation.
     """
@@ -80,5 +80,5 @@
         return
     site = context.getSite()
-    removeSkin( site, 'quintagroup.seoptimizer' )
-    removeActions( site )
-    remove_configlets( site, ('quintagroup.seoptimizer',))
+    removeSkin(site, 'quintagroup.seoptimizer' )
+    removeActions(site)
+    remove_configlets(site, ('quintagroup.seoptimizer',))
