Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define template in view, not in zcml. #17

Merged
merged 1 commit into from May 20, 2019
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

@@ -5,6 +5,8 @@ Changelog
1.0.6 (unreleased)
------------------

- Define template in view, not in zcml. [jone]

- Add macros and slots to block views for easy customization. [jone]

- Make iframe fixes compatible with ftw.iframefix 2.0. [Kevin Bieri]
@@ -12,7 +12,6 @@
name="block_view"
permission="zope2.View"
class=".htmlblock.HtmlBlockView"
template="templates/htmlblock.pt"
/>

</configure>
@@ -1,10 +1,10 @@
from ftw.simplelayout.browser.blocks.base import BaseBlock
from plone import api
from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile


class HtmlBlockView(BaseBlock):
def __call__(self):
return self.index()
template = ViewPageTemplateFile('templates/htmlblock.pt')

def can_add(self):
return api.user.has_permission('ftw.htmlblock: Add HTML block')
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.