Re: What I'd like to see gsoc achieve: plone distributions
Dylan Jay <djay-n0pU0XVUApFWk0Htik3J/[email protected]>
| Newsgroups | gmane.comp.web.zope.plone.devel |
|---|---|
| Message-ID | <[email protected]> |
> On 2 Apr 2015, at 3:22 pm, Asko Soukka <[email protected]> wrote: > > Dylan Jay wrote: >> I think porlet assignments are great but portal_skins is a bad idea. > > AFAIK, TTW doable legacy portlets support only page templates found through acquisition and portal_skins/custom is better than site root. I haven't used a legacy portlet in 5 years. They should really die since nowhere else lets you put ZPT code inside the content space and where content editors can screw it up and break the page. In fact can't we drop it in plone5? Instead I'd recommend the following approach. Use diazo. Use diazo with fragments to ttw python views. Use portlet styles so the user can select the kind of portlet that the functionality should appear in. Or tinymce styles. We also use c.listingviews portlets with custom TAL expressions and diazo it. For example you can use that to create a portlet with the last updated date of the current page. > >> fragments is better but erics idea of theme views is even better (https://github.com/ebrehault/collective.ttw) > > Fragments are implemented as views. > > I did an experimental branch, where you can define restricted python view methods for fragment views: > > https://github.com/collective/collective.themefragments/commit/75c194b26a5dd9a3827c2d43876042fb3cd860c2 > > So, if you have fragment > > fragments/navbar.pt > > you can have method > > fragments/navbar.get_elements.py > > And call it in navbar.pt like > > <tal:block repeat="element view/get_elements"> > ... > </tal:block> > > In the current implementation those methods don't take any parameters, > but do have 'self', which is a browser view with 'context', and 'request'. Can you call python directly from diazo? Is there any differences from what you've added to fragments and erics proposal? > > Regards, > Asko ------------------------------------------------------------------------------ Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/