Skip to main content

SimpleAlias is a product that let's you create aliases or shortcuts to content somewhere in your Plone.

Project description

Requirements

This components requires Plone 3.0 or better.

What is SimpleAlias?

SimpleAlias is a product that let’s you create aliases or shortcuts to content somewhere in your portal. It behaves similar to an alias in the filesystem. In many cases you want to have such a link in a folder to some object elsewhere in the portal without having to recreate that object. Of course you can use the Link object but that is rather primitive.

SimpleAlias introduces a new content type: Alias. Once you create the Alias, you can create a reference to another object in the portal and the Alias will copy the title and description of this target object. When you view the alias, it shows the object within the context of the Alias and it presents the user a link to the target object itself. So, no scary traversal tricks. You remain in the context of the Alias.

Another way to create an Alias to an object is to copy that object in the contents view of the objects container and then to go to the location where you want to Alias and click on ‘Paste as alias’ in the contents view.

It’s as simple as that. SimpleAlias can only link to AT 1.3+ based objects so to make real use of it you will need ATContentTypes.

Installation

Products.SimpleAlias is available as egg. So you can just install it using pip or easy_install.

To install it using zc.buildout, just add this line in the plone.recipe.zope2instance part of your buildout.cfg

[instance]
recipe = plone.recipe.zope2instance
...
eggs =
    ...
    Products.SimpleAlias

Ans, of course, re-run your buildout.

simplealias_tool

In the root of your portal, in ZMI, a new tool is created. This tool allows you to filter portal types to which you cannot create a link to. It only filters the Target object list in the edit view of the Alias.

The content icons

An Alias uses the target object’s icon. If there is an alias-variant for this icon then SimpleAlias will use that instead. That works as follows: Suppose the target object’s icon is document_icon.gif. If there exists an icon with id document_icon_alias.gif, SimpleAlias will use that icon instead. SimpleAlias comes with alias icons for the common Plone icons but of course you can create them yourself. In the SimpleAlias skinfolder there is a gif alias-arrow.gif. You can overlay that over your icon (preferably in the lower-right corner, with one pixel space to the right and bottom). Save it as <original icon name>_alias.gif. SimpleAlias will use that if it can find it.

Permissions

Since there is hardly any trickery in SimpleAlias, there is one security issue you have to be aware of: If you create an Alias that points to a target object in a restricted area of your portal then a user who has view permissions for the Alias and not for the target object WILL see the title and description of the target object. Think about that for a while. So, the Alias will cache/show the title and description of the target, no matter what, when the user may view the Alias. So you will have to be aware of this when you create the Alias.

Folderishness

An Alias mimicks the folderishness of the target object. If the target object is a folder then the attribute isPrincipiaFolderish will return 1 for the Alias eventhough it is not folderish itself. By doing this, the Alias object will be visible in the navigation portlet if the target is folderish. The only downside (as far as I can see) is that sometimes you get a folder_contents view of the Alias without contents (since the Alias itself is not really folderish). Pff, well, it’s not as complicated as this paragraph itself ;-)

Limitations

The view of content types that have no “main” macro, may be ugly. Sorry but we can’t find an easy workaround. You just need to add such content types in the ‘portal_type_filters” property of the ‘simplealias_tool’ object in ZMI.

Feedback

Please send your feedback to danny dot bloemendaal at companion dot nl, or use the tracker available from http://plone.org/products/simplealias

Releases

You may find newer releases of SimpleAlias at http://plone.org/products/simplealias or http://pypi.python.org/pypi/Products.SimpleAlias . But you’re certainly reading one of these pages.

Changes

TODO

  • Use z3 views

  • Use the event machinery follow targets workflow state (difficult)?

  • Use the Subject (keywords) of the target ?

  • Fix i18n weirdnesses (find why…) on status message

  • Add i18n/*.pot files when translations are fixed

  • Support for content types with Zope3 style views (not just a CMF skin template)

2.1.1

  • Distributed as an egg (Products.SimpleAlias) [macadames]

  • added a french translation [macadames]

2.1.0

  • When autoTitle is enabled, the alias’ title/description will now remain in sync with the linked to content object. [duffyd]

  • Fix GS export handler to handle sites without the tool installed. [wichert]

2.0.0

  • Added simplealias.xml GenericSetup step. [glenfant]

  • Extended the list of not aliasable content types. [glenfant]

  • Fixed bug in Alias type (getIcon method appeared twice!!) [lenfant]

2.0RC1

  • New style templates awareness when embedding target view - stolen from CMFEditions [glenfant]

  • Plone 3 awareness [glenfant, wichert]

  • Installation based on GenericSetup [glenfant, wichert]

  • Fixed unit tests [glenfant]

  • portal_type_filters property is now multiple selection [glenfant]

  • using ‘shasattr’ (safer) instead of ‘getattr’ to check object referenceability [glenfant]

  • Alias created from clipboard have meaningful ids [glenfant]

  • Using real exceptions in manage_pasteAsAlias in tool [glenfant]

  • Using new portal message framework [glenfant]

1.1 (unreleased)

  • Plone 2.5 aware. Made it dependant on ATCT and used the new FTI [ender]

  • Moved content to content folder and added some stuff in __init__.py to make it compatible with previous versions. [ender]

  • Added tests

  • Moved getAliasIcon to the tool where it belongs. [ender]

1.0 (unreleased)

  • Plone 2.1 compatibility - naro

  • Added auto_title flag to make possible to edit title and description - zegor

  • Fix ATCT portal_type problem - zegor

  • Disabled folderish emulation - zegor

  • Added i18n + french translation - zegor

  • Added metadata files for HTTP caching - zegor

  • Added CHANGES file - zegor

  • Some zpt improvements - zegor

  • Added viewlet for contentpanels - zegor

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Products.SimpleAlias-2.1.1.tar.gz (32.1 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page