Re: [Repoze-dev] owrap layout through zcml

2009-09-14 Thread Malthe Borch
2009/9/12 Chris McDonough : > At some point I had considered using a Chameleon expression prefix to > separate these sorts of "builtin" names from the main template namespace > names.  For example, instead of "tal:replace="href api.context_url", > you'd access builtins via an expression type, e.g.

Re: [Repoze-dev] owrap layout through zcml

2009-09-14 Thread Chris McDonough
Responding to myself, I've actually checked in this feature on the trunk too. Chris McDonough wrote: > So... to stop hijacking Robert's idea for a directive which spells an > owrap for a view... I have a slightly different idea for this. > > We could allow a ZCML "inner" view directive to spell

Re: [Repoze-dev] owrap layout through zcml

2009-09-14 Thread Chris McDonough
So... to stop hijacking Robert's idea for a directive which spells an owrap for a view... I have a slightly different idea for this. We could allow a ZCML "inner" view directive to spell a "wrapper view name" ala: Note that the "owrap" view above uses the new "template" feature recently ch

Re: [Repoze-dev] owrap layout through zcml

2009-09-12 Thread Chris McDonough
Tim Hoffman wrote: > HI Chris > > I a way you describing something simliar to what we have in zope2, in > that from a tal expression we have access to > (via acquisition) all of the portal tools etc... > > I wonder if a couple of hi level functions could be put into the > namespace, (or the view

Re: [Repoze-dev] owrap layout through zcml

2009-09-12 Thread Tim Hoffman
HI Chris I a way you describing something simliar to what we have in zope2, in that from a tal expression we have access to (via acquisition) all of the portal tools etc... I wonder if a couple of hi level functions could be put into the namespace, (or the view for instance) that allow you to loo

Re: [Repoze-dev] owrap layout through zcml

2009-09-12 Thread Chris McDonough
So I've been trying to puzzle out some issues, which might or might not be related to this topic. In KARL, we currently write all of our views something in the form of: def myview(context, request): [ do stuff ] api = TemplateAPI(context, request) # a utility class return render_temp

Re: [Repoze-dev] owrap layout through zcml

2009-08-25 Thread Robert Marianski
On Mon, Aug 24, 2009 at 10:11:04PM -0400, Chris McDonough wrote: > I like this. > > Some variations: > > - Have IOWrap be a multiadapter on context and request, so we can vary the > o-wrap based on request type too (e.g. "IManagementRequest" vs. > "IRetailRequest"). Good idea. I'll go ahead an

Re: [Repoze-dev] owrap layout through zcml

2009-08-25 Thread Malthe Borch
2009/8/24 Chris McDonough : > Malthe said it might be possible to register one or more new TAL expression > types (each of which might represent a namespace) so templates could do > something like tal:content="api:something" (note colon instead of dot) to get > top-level names instead.  The view wo

Re: [Repoze-dev] owrap layout through zcml

2009-08-24 Thread Chris McDonough
I like this. Some variations: - Have IOWrap be a multiadapter on context and request, so we can vary the o-wrap based on request type too (e.g. "IManagementRequest" vs. "IRetailRequest"). - If IOWrap can't be adapted, just return the result of the view (instead of throwing a component lookup

[Repoze-dev] owrap layout through zcml

2009-08-23 Thread Robert Marianski
I was thinking about different ways to apply the owrap theme that's typical for most applications. I like the way that z3c.pagelet does it: http://svn.zope.org/z3c.pagelet/trunk/ To summarize, views are registered through a different directive, and then a layout is applied with a special directiv