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 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 PLIP 126.

The result of the work in this bundle is that site administrators may optionally make 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

 * Plone:

- Default profile creates a 'redirect_links' property (value: False) in site_properties - Added to the plone_content skin layer. This redirects or falls back to link_view depending on the value of the 'redirect_links' property. - 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) - now shows a "This Link will redirect" notice to editors when 'redirect_links'
     is enabled


- 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 creation
 - 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
- 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 availability of
this option.

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)

Backwards compatibility

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 'redirect_links' option
actually function.)

Other considerations

 * 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


David Glick
Web Developer

New tools and strategies for engaging people in protecting the environment
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

Reply via email to