Skip to content

Commit 2b5fef8

Browse files
authored
Merge pull request #2057 from MrTango/patch_views
Replace Plone 5 links with Plone 6 links in views chapter
2 parents 6d4b304 + a9ecaf4 commit 2b5fef8

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

docs/classic-ui/views.md

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -711,21 +711,13 @@ class MyView(object):
711711

712712
However, in most cases:
713713

714-
```{todo}
715-
Replace links to Plone 5.2 docs with links to Plone 6 docs.
716-
Specifically:
717-
718-
- [TAL page template](https://5.docs.plone.org/adapt-and-extend/theming/templates_css/template_basics)
719-
- [interface](https://5.docs.plone.org/develop/addons/components/interfaces)
720-
```
721-
722714
- Full Plone page views are a subclass of [`Products.Five.browser.BrowserView`](https://github.com/zopefoundation/Zope/blob/d1814d0a6bddb615629b552de10e9aa5ad30a6da/src/Products/Five/browser/__init__.py#L20) which is a wrapper class.
723715
It wraps [`zope.publisher.browser.BrowserView`](https://github.com/zopefoundation/zope.publisher/blob/dea3d4757390d04f6a5b53e696f08d0cab5f6023/src/zope/publisher/browser.py#L958), and adds an acquisition (parent traversal) support for it.
724-
- Views have an attribute `index`, which points to a [TAL page template](https://5.docs.plone.org/adapt-and-extend/theming/templates_css/template_basics) that is responsible for rendering the HTML code.
716+
- Views have an attribute `index`, which points to a {doc}`TAL page template </classic-ui/templates>` that is responsible for rendering the HTML code.
725717
You get the HTML output with `self.index()`.
726718
The page template gets a context argument `view`, pointing to the view class instance.
727719
The `index` value is usually an instance of [`Products.Five.browser.pagetemplate.ViewPageTemplateFile`](https://github.com/zopefoundation/Zope/blob/d1814d0a6bddb615629b552de10e9aa5ad30a6da/src/Products/Five/browser/pagetemplatefile.py#L35) for full Plone pages or [`zope.pagetemplate.pagetemplatefile.PageTemplateFile`](https://github.com/zopefoundation/zope.pagetemplate/blob/14ba59c98e12517b9f8abcdb24bc882bb435ed7c/src/zope/pagetemplate/pagetemplatefile.py#L43) for HTML snippets without using acquisition.
728-
- View classes should implement the [interface](https://5.docs.plone.org/develop/addons/components/interfaces)
720+
- View classes should implement the {doc}`interface </backend/interfaces>`
729721
[`zope.browser.interfaces.IBrowserView`](https://github.com/zopefoundation/zope.browser/blob/1239c75e4e190df992bf34a88b4ead2c952afe86/src/zope/browser/interfaces.py#L27).
730722
731723
Views that render page snippets and parts can be direct subclasses of `zope.publisher.browser.BrowserView`, as snippets might not need acquisition support which adds some overhead to the rendering process.
@@ -839,7 +831,7 @@ Make sure that you declare the `i18n:domain` again, or the strings in this templ
839831
840832
## Access a view instance in code
841833
842-
You need to get access to the view in your code if you call a view from either:
834+
You need to get access to the view in your code if you call a view from either:
843835
844836
- inside another view
845837
- your unit test code
@@ -1126,4 +1118,4 @@ One workaround to avoid this mess is to use `aq_inner` when accessing `self.obj`
11261118
11271119
- {doc}`/classic-ui/layers`
11281120
- {doc}`/classic-ui/templates`
1129-
- {doc}`/classic-ui/viewlets`
1121+
- {doc}`/classic-ui/viewlets`

0 commit comments

Comments
 (0)