Smart Link
==========

An enhanced version of the base Plone link content type.

After intalling this you'll see that the Plone link will have a new **image field** and **caption**
like the News Item content type.

As News Item do, the Link now behave **image resize** feature.

Also the new Link type can handle internal (to Plone contents) and external links. You can use the
internal link field to automatically attach the link value to an internal content of the portal
(in a similar way used for related contents).

An event-based system will also keep URLs updated even when you move/rename target document.

Handle backend/frontend URLs
----------------------------

The Smart Link structure is nothing more that a ATLink content, so the way used to store URL
in the object or in the portal_catalog is the same as Plone does. There is no magic behind.

For this reason, when you are using Smart Link for internal references, the *static* URL is
stored and used.

This will lead to problems when you are using this product for site where you have different
backend/frontend URLs. For this reason you must use the "*Configure Smart Link*" control panel
to handle URL transformation.

You can also use a control that say to Smart Link to store relative URLs but this will also
include the Plone site id (and you must rewrite this from Apache if you don't like this). 

Warning 1
---------

Smart Link shapechange itself and hide from portal_types tool the basic Plone Link type!

Warning 2
---------

**Pay attention** when you update the whole portal_catalog using ZMI from URLs different from
backend or frontend ones (for example: using a tunnel).

If you run the update from (for example) "localhost:8090/site" and this URL is not the public
or backend URL, all your internal links will be changed to this hostname!

Another catalog update (from the right URL) will fix this.

FileSystemStorage
-----------------

The product try to register the link image field onto `iw.fss`__ if it's installed.

__ http://pypi.python.org/pypi/iw.fss

Credits
-------

Part of the code of Smart Link was taken from the `ComboLink`__ Plone (and Plonegov) product.
This project was giving the same internal link feature in old 2.1/2.5 Plone releases.

__ http://plone.org/products/combolink/

TODO
----
 

* Fix this ugly error: *WARNING SecurityInfo Conflicting security declarations for setId*
* Add more control on content icon. For remote site can be pretty the remote site favicon
* An anchor field. It seems useless for external resources, but can be usefull for internal link
  to Plone contents with anchors inside
* A better clean-uninstall that really remove all stuff (like marker interfaces applyed)

References
----------

* Code repository: http://svn.plone.org/svn/collective/redturtle.smartlink/
* Questions? Comments? *sviluppoplone AT redturtle.net*
* Any great idea? Found a bug? http://plone.org/products/smart-link/issues

