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

fixed the msg in view , added tal:content=view/msg expression in the … #547

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
4 changes: 4 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,14 @@ New features:

Bug fixes:

- fixed the msg in view , added tal:content="view/msg" expression in the <p> tag that will call the msg
[Coder-aadarsh]

- add min_version = 4.11.0 to addon tempalte tox.ini
[MrTango]



6.3.1 (2023-10-31)
------------------

Expand Down
4 changes: 4 additions & 0 deletions bobtemplates/plone/view/views/+view_python_file_name+.py.bob
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ class {{{ view_python_class_name }}}({{{ view_base_class }}}):
{{% else %}}
return self.index()
{{% endif %}}

def msg(self):
return f"msg from {self.__class__.__name__}"

{{% else %}}
def __call__(self):
template = '''<li class="heading" i18n:translate="">
Expand Down
1 change: 1 addition & 0 deletions bobtemplates/plone/view/views/+view_template_name+.pt.bob
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
<metal:block define-macro="content-core">

<h2>Main content</h2>
<p tal:content="view/msg">this gets replaced</p>
<!--<div tal:replace="view/my_custom_view_method" />-->
<!--<div tal:replace="context/my_custom_field" />-->

Expand Down
Loading