[Zope-CMF] Re: DirectoryView, GenericSetup/skins, CMF 2.1
yuppie
y.2006_ at wcm-solutions.de
Sun Jul 9 07:46:56 EDT 2006
Hi Rocky!
Rocky Burt wrote:
>
> Perhaps a patch from my side would more adequately explain what it is
> I'm trying to accomplish.
>
> I've attached the patch to this message. The only thing that is missing
> (for me) is tests at this point.
+1 for fixing this, but may I suggest another approach?
'minimal_fp' is a registry key created by 'utils.minimalpath'. Right now
'DirectoryView._dirpath' contains this registry key and I'd prefer to
keep it like that.
The keys generated by 'utils.minimalpath' currently look like this:
"MyProduct/skins/my_skin"
"full/path/to/MyPackage/skins/my_skin"
But we could change 'utils.minimalpath' to generate keys like these:
"Products/MyProduct/skins/my_skin"
"MyPackage/skins/my_skin"
While it doesn't make sense to store
"full/path/to/MyPackage/skins/my_skin" in 'DirectoryView._dirpath'
"MyPackage/skins/my_skin" would work fine. All we need is a migration path.
We can use the same pattern as for GenericSetup's registerProfile:
Omitting 'Products/' would become deprecated. For backwards
compatibility DirectoryInformations are first looked up with a
"Products/" prefix and if no DirectoryInformation is registered for that
key the plain 'DirectoryView._dirpath' is looked up.
With this lookup order "MyPackage/skins/my_skin" is masked by
"Products/MyPackage/skins/my_skin", but I guess we can live without
support for that rare case until we remove the BBB code.
Cheers,
Yuppie
More information about the Zope-CMF
mailing list