[Zope3-dev] Ugly URLs
Jim Fulton
jim@zope.com
Wed, 05 Dec 2001 14:29:49 -0500
Chris Withers wrote:
>
> Jim Fulton wrote:
> >
> > Chris Withers wrote:
> > >
> > > sean.bowman@acm.org wrote:
> > > >
> > > > I think ExplicitNamespaceControlInURLs on the wiki says something about
>
> Just noticed... annoying niggle on this page, why does wrapping not work?
It works,, but only down to a certain width, It turns out it never gets skinnier
than the widest <pre>. I quoted a line that was long and this caused a long
<pre>ed line. I fixed this,
(snip)
> Hmmm... I think it's very important what the default namespace order is. If it's
> right, then you'd hardly ever need to use this syntax, in which case I think
> it's the best solution :-)
>
> For example, a non object-container would have a lookup order:
You cheated and pickled the easy case. ;)
> -presentation
> -attributes
If a content object doesn't have presentation logic
in it, why would an attribute be published directly?
> -acquisition?
If you use implicit acquisition. I expect implicit
acquisition to fade from usage. Acquisition will still
be important, but will be more explicit, more predictable, and
ultimately, more useful.
> While an object-container might have:
> -items
> -presentation
> -attributes
> -acquisition?
>
> How hard would it be to make this configurable, using zcml for example?
Not hard at all. There are components that are responsible for
URL traversal. Simply find or write a component that implements the
policy you want and register it in the configuration file or TTW.
Note that with the policy above, you will *always* need to use semicolons
to get to presentation components unless you can arrange that the item
and presentation namespaces don't overlap (e.g. by using integer item
names).
> This might be a nice way of controlling acquisition too :-)
Sure.
> BTW, I think bavarian (who are ya, bavarian?) 's suggestion is absolute genius.
> I wonder how it could be woven in?
I'm going to write a separate proposal on this.
Stay tuned.
> My only comment would be to not worry about other presentations... for example,
> if you upload a .png, then obviously it'll have a .png presentation, but why
> should it have a .jpg presentation at all?
Dunno. That's up the component developer. :)
> I expecially like the .html = rendered, .zpt = source options, writing the FTP
> and WebDAV adapters for those could be fun ;-)
My too, or even ".py" source and ".html" render and "" (no suffix)
use from Python.
Jim
--
Jim Fulton mailto:jim@zope.com Python Powered!
CTO (888) 344-4332 http://www.python.org
Zope Corporation http://www.zope.com http://www.zope.org