#126: Link type should automatically redirect when accessed directly
Links should be capable of doing automatic redirection.
- Proposed by
- Alexander Limi
- Seconded by
- David Glick
- Proposal type
- Assigned to release
- Repository branch
Currently, the Plone standard "link" content type is handled correctly in navigation, such that if you have permission to edit the link, you will go to the actual link object, but if you don't have permission, you will go to the link's target. However, if you access the link directly while logged out, it does not redirect to the target.
Adding this functionality is simple and is useful for cases where there is a desire for a short URL that redirects to something buried deep in a site.
The link type should be extended with the following ability:
- Automatic redirection - when you can edit the object, it doesn't do this, though - like with File/Link objects in the current listings, it goes/acts directly on the object if you don't have the permissions to edit it, and goes to the view page if you have editing permissions
(Note: A previous revision of this PLIP also talked about making Links pop up in a new window, which is already an option in Plone 3. Some of the comments of this PLIP refer to that obsolete part of the proposal.)
This can be done rather simply by changing the default Link view to the script appearing in the final comment on http://plone.org/documentation/how-to/repurpose-link-object
- Code: New default link view in CMFPlone plone_content skin layer.
- Documentation: http://plone.org/documentation/how-to/repurpose-link-object should be updated.
None, as far as I can see. The old default link_view is still used when the link is actually accessed (e.g. if user has permission to edit it).
This PLIP has been implemented on branches and can be reviewed using this buildout: http://svn.plone.org/svn/plone/review/plip126-link-redirects.
See http://svn.plone.org/svn/plone/review/plip126-link-redirects/PLIP_126_README.txt for a detailed summary of the changes.
David Glick, with assistance from Andrew Burkhalter