PLIP 126 (Link type should automatically redirect when accessed
directly) has been implemented. You can get the review buildout from:
I'm going to paste the contents of http://svn.plone.org/svn/plone/review/plip126-link-redirects/PLIP_126_README.txt
here for ease of any discussion...
Review bundle for PLIP 126: Link type should automatically redirect
when accessed directly
This bundle presents the branches that have been modified to implement
The result of the work in this bundle is that site administrators may
the default view of the Link content type redirect to the target URL
of the link. (The target
was already used when Links are shown in navigation, but not if the
link object is accessed
Summary of changes
- Default profile creates a 'redirect_links' property (value:
False) in site_properties
- Added link_redirect_view.py to the plone_content skin layer.
This redirects or falls
back to link_view depending on the value of the 'redirect_links'
- Default profile sets link_redirect_view to be the default view
for the Link type
- Plone 3.2 to 3.3 migration profile performs the same changes as
were made to the default
profile (the default view is only changed if the old view was
link_view, e.g. uncustomized)
- link_view.pt now shows a "This Link will redirect" notice to
editors when 'redirect_links'
- Added a checkbox on the types configlet for the Link type only,
which controls the
'redirect_links' property. We could put this on another
configlet but types seems like
the most logical place someone would look for it.
Summary of test assertions
- 'redirect_links' property is created and set to False on site
- ditto on migration from <3.3
- Added basic functional test coverage to types configlet. Just
because it was non-existent.
- Types configlet can be used to set the 'redirect_links' property
- redirect_link_view.py redirects only if redirect_links is True and
the user doesn't
have permission to edit the link
Needed documentation changes
Documentation of the Link content type should be updated to note the
Documentation of the types configlet should be updated to reflect the
presence of the
'Redirect immediately to link target' setting in Plone 3.3+
Existing documentation of how to make links automatically redirect
should be updated to
describe the new option. (e.g.
-- the approach I've taken is based on the last comment on that howto)
Existing behavior should not change unless the site administrator
turns on the new option.
Existing installations in which the 'link_view' script was customized
will continue to work
despite the change in the default view for Links, because
link_redirect_view delegates to
link_view after checking the redirect_links option.
Existing installations that have changed the default view for Links to
something other than
link_view should continue to work, because the migration that changes
the default Link view
from link_view to link_redirect_view only runs if the old value was
link_view. (Of course,
in this scenario, some custom work will be needed to make the new
* Translations for the 'types_controlpanel_redirect_links' and
'message_permissions_blocking_link_redirect' msgids should be added.
* I experimented with, but ultimately deferred removing the
conditional code in many
listing views that handles Links as a special case in order to
link to the target URL.
This becomes unnecessary if redirect_links is true, because you
can go to the Link like
any other content type and its default view will take care of
redirecting to the target.
However, setting redirect_links to True seemed like too big of a
behavior change for the
3.x series, so I have instead added a draft PLIP suggesting this
change for 4.x:
* David Glick
* Andrew Burkhalter
New tools and strategies for engaging people in protecting the
work: (206) 286-1235 x32
mobile: (206) 679-3833
Subscribe to ONEList, our email newsletter!
Practical advice for effective online engagement
Framework-Team mailing list