[Zope-CMF] Proposition: Favourite with absolute url AND the
query - any idea
Tres Seaver
tseaver@zope.com
06 Aug 2002 09:27:38 -0400
On Tue, 2002-08-06 at 08:07, Yuppie wrote:
> Hi!
>
> Heimo Laukkanen wrote:
> > I was just playing around with CMF and favorites. While trying to save a
> > lsit of search results as a favorite, I noticed that it is not
> > possible, since it only takes the absolute url of the object.
>
> You can do that by customizing the addtoFavorites script in your skin.
> But you'll run in some problems:
>
> 1.) There's an inconsistency: invokeFactory/addFavorite needs a path
> without query string as remote_url. But edit() allows you to use an url
> with query string in remote_url.
>
> 2.) getObject() and getIcon() might not give you the result you expect:
> getObject() gives you an ugly Traceback and getIcon() returns 'p_/broken'.
Right; the favorite needs the 'remote_url' to work as a path reference
to the object. To accomodate this idea, we would need to capture the
query string separately from the object URL. Perhaps we could store the
individual name/value pairs in a structure (e.g., a PersistentMapping)
which would allow users to add / remove / edit individual pairs?
> > Would there be any idea to save the absolute_url and the query. I said
> > that one reason why it would make sense, but are there downsides?
>
> Favorite doesn't save the absolute URL. So you can move your site easily
> from one domain to another without breaking your favorites.
>
> > Possible saving in the agruments also portal messages etc. that would be
> > shown again and again after that?
>
> Customize addtoFavorites the way you like it.
Tres.