← Back to team overview

launchpad-dev team mailing list archive

Re: Clarification request: layer vs facet and the meaning thereof

 

Hi Tim,

Facet is an old mechanism of tying a view to a menu. It was added before Zope 
had layers.


On August 9, 2010, Tim Penhey wrote:
> Hi Devs,
> 
> This is something that has bothered me for a while, but been below my
> general irritation threshold.  Given my newly implemented mojo approach of
> stopping when I see bad things, this has floated to the top.
> 
> I'm looking at some browser configuration ZCML.
> 
> We have "facet" attributes, general <facet facet="branches"> tags, and
> "layer" attributes for browser pages.
> 
> Which should we be using?

Layer.

> What is the impact of specifying a facet?

It sets the __launchpad_facetname__ attribute on the view which is used by the 
FacetMenu code.

> What is the impact of specifying a layer?
> 

It registers the view to be available only on request of a particular vhost.

Facet should be removed in favor of layers. 
https://bugs.edge.launchpad.net/launchpad-foundations/+bug/226917
explains briefly what needs to happen there.

Removing facet would allow us to get rid of most of our override of zope 
standard ZCML directives.


-- 
Francis J. Lacoste
francis.lacoste@xxxxxxxxxxxxx

Attachment: signature.asc
Description: This is a digitally signed message part.


Follow ups

References