Package: anthill.skinner
IntroductionThis package provides functionality to ease skinning of plone.
It is built around the idea that you shouldn’t have to adapt much plone
templates but instead take any layout you want and put it on top of Plone.That means that all editing is done using Plone skin but for anonymous users
(or users not having the correct permission) another skin is shown. This works
based on rules described below. No url switching or iframe magic needed.It resemblescollective.skinnybut instead of imposing customized templates
for each and every content type this package tries to reuse already
existing views and templates. You also won’t need a special server
configuration to redirect to ++skin++ or such. With some coding it is also
possible to use this for community sites because peoplecanlog in and
either (if permission is set) they see the well-known Plone interface or the public skin.
Also there is no need to hack around to prevent plone templates fromleakingbecause youwantto display all plone related templates as is.Full Example provided here:http://pypi.python.org/pypi/anthill.examplethemeInstallationInclude anthill.skinner in your buildout.cfgMake sure to also include z3c.autoincludeRerun buildoutRestart your Zope instanceGo to portal_quickinstaller and install anthill.skinnerATT: Make sure to restart Zope - this is because of a handler only being
evaluated on startupThere should be a new link “Show Preview” on the bottomCreation of a theme (simple way)Create a new folder custom_public in portal_skinsInclude this folder in portal_skins/manage_propertiesForm in publicviewCustomize anthill_skinner_templates/main_template to custom_publicPut images and CSS also to this folderFor a more elaborate example look at anthill.examplethemeDependenciesz3c.autoincludeanthill.tal.macrorendererTested withPlone 4.x (for Plone 3.x use version <0.7)ProsNo need to understand the complex plone template logicNo need to write a new handbook for editors - take any recent plone book
because the edit skin stays the sameLess work when updating to a new Plone version because you didn’t touch
much of the templatesAlmost no limitations for your theme/design that could be imposed by the
fact that you need to include all the edit functionality (tabs, …) into
your themeBy not having to fiddle with Plone inner logic/templates that much you save
much timeConsEditors have no in-place editing - although you can change to the edit view
on every context there’s one more click neededIncluding plone portlets into your theme is a little more complexSimilar packagescollective.skinnycollective.editskinswitcherRulesInstead of having url based rules this package uses simple rules suitable for
most deployments. If you don’t like these rules then you can easily overwrite
them.Rules to show public skin are as follows (order matters):User is anonymousUser is authenticated but has not the correct permission (anthill: View CMS)User is authenticated, has the correct permission but activated previewThere is a request variable named anthill.skinner.previewAll rules can be found inbrowser/handling#mustDisplayPublicSkin.Overwrite rulesYou can overwrite these rules by defining an adapter. Please keep in mind that if
you overwrite rules then you need to overwrite all rules!configure.zcml:<adapter
    for="anthill.skinner.interfaces.ISkinHandler"
    provides="anthill.skinner.interfaces.IRuleOverwrite"
    factory="your.product.publicview.RuleMaker"
/>publicview.py:class RuleMaker:
    implements(IRuleOverwrite)

    def __init__(self, context):
        self.context = context

    def mustDisplayPublicView(self, context, request):
        return TrueHow to create your own skinIn order to create your own skin first take a look at the very simple example
included in this package. It shows you how to define your menu and how content
will be displayed.Please be aware of the fact that it is intended to not load any of the css or
javascript coming with Plone.You can then create your own theme based on anthill.skinner by simply using the
same skin and layer for your resources. Useanthill.skinner.interfaces.IPublicSkinLayeras the layer andpublicviewas the skin name you’re putting your stuff into.ThanksDevelopers of collective.skinnyPlone communitybanality design & communication for funding this (all anthill.* packages)This package is part of the anthill.* ecosystem that powers many websites all
around the world - all being built on top of this package (originally for
Plone 2.x).Changelog0.8 (2010-11-30)Added possibility to select language for menu items
[spamsch]Plone 4 compatibility
[spamsch]0.6 (2009-11-27)Many more fixes to utility methods
[spamsch]Fixed renderer to use context for macro rendering
[spamsch]Fixed navtree to always use folderish context
[spamsch]Now taking review state into account for display
[spamsch]Added method to check if context is portal root
[spamsch]Fixed severe bug in user auth where skinner would never
switch into cms mode even if user has authenticated
[spamsch]0.5 - 2009-10-28Fixed severe bug in main_template always showing error [spamsch]0.4 - 2009-08-14Fixed skinner to be only active where installed using portal_quickinstaller [spamsch]0.3 - 2009-08-09Fixed z3c.autoinclude inclusion in configure.zcml [spamsch]0.2 - 2009-08-08Added menu generator for public views to ease menu separation and usage [spamsch]Fixed preview activation and deactivation link to use the current context
and stick to the folder [spamsch]0.1 - 2009-06-08Initial release