El jue, 09-03-2006 a las 11:59 +0100, Josias Thöny escribió: > On Thu, 2006-03-09 at 11:29 +0100, Andreas Hartmann wrote: > > Thorsten Scherler wrote: > > > El jue, 09-03-2006 a las 09:45 +0100, Andreas Hartmann escribió: > > >> [EMAIL PROTECTED] wrote: > > >>> Author: thorsten > > >>> Date: Mon Mar 6 02:50:01 2006 > > >>> New Revision: 383510 > > >>> > > >>> URL: http://svn.apache.org/viewcvs?rev=383510&view=rev > > >>> Log: > > >>> Adding the content dir to the fallback URIs like described in > > >>> http://marc.theaimsgroup.com/?l=lenya-dev&m=114142602919893&w=2. This > > >>> fixes the second part of the 'external' resources/asset preview. > > >>> > > >>> Modified: > > >>> > > >>> lenya/trunk/src/java/org/apache/lenya/cms/publication/templating/PublicationTemplateManagerImpl.java > > >>> > > >>> Modified: > > >>> lenya/trunk/src/java/org/apache/lenya/cms/publication/templating/PublicationTemplateManagerImpl.java > > >>> URL: > > >>> http://svn.apache.org/viewcvs/lenya/trunk/src/java/org/apache/lenya/cms/publication/templating/PublicationTemplateManagerImpl.java?rev=383510&r1=383509&r2=383510&view=diff > > >>> ============================================================================== > > >>> --- > > >>> lenya/trunk/src/java/org/apache/lenya/cms/publication/templating/PublicationTemplateManagerImpl.java > > >>> (original) > > >>> +++ > > >>> lenya/trunk/src/java/org/apache/lenya/cms/publication/templating/PublicationTemplateManagerImpl.java > > >>> Mon Mar 6 02:50:01 2006 > > >>> @@ -111,10 +111,15 @@ > > >>> protected String[] getBaseURIs(Publication publication) { > > >>> > > >>> List uris = new ArrayList(); > > >>> + String contentDir = null; > > >>> > > >>> Publication[] publications = getPublications(publication); > > >>> for (int i = 0; i < publications.length; i++) { > > >>> uris.add(getBaseURI(publications[i])); > > >>> + contentDir = publications[i].getContentDir(); > > >>> + if (contentDir != null){ > > >>> + uris.add(contentDir); > > >>> + } > > >> Thorsten, does this really make sense? IMO it is very dangerous. > > >> The fallback has a well-defined meaning [1]. If we add the content > > >> directory to the list of URLs to traverse, we have two different > > >> locations in the same publication that could match. > > > > > > Yeah, but I do not see a problem here, that is the concept of fallback, > > > or? ;) > > > > No, the concept of fallback is falling back from the publication to its > > template(s) and finally to the core. > > > > > Using [1] for resources (like images/assets): > > > 1. content-dir://resources/shared/images/foo.png > > > 2. context://lenya/pubs/my-pub/resources/shared/images/foo.png > > > 3. context://lenya/pubs/template(my-pub)/resources/shared/images/foo.png > > > 4. > > > context://lenya/pubs/template(template(my-pub))/resources/shared/images/foo.png > > > 5. ... > > > 6. context://resources/shared/images/foo.png > > > > This would be a whole new concept. I would not extend fallback to > > these resources. > > IMHO shared resources should not be in the content-dir anyway, because > they are not really content (they cannot be created and edited in > lenya). And so far fallback was working for those shared resources which > seems right to me. > But for the "real" content resources (the ones in the authoring and live > dirs) I would not allow fallback for the reasons Andreas gave.
...but we are *doing* this already! http://svn.apache.org/viewcvs.cgi/lenya/trunk/src/webapp/lenya/resources.xmap?view=markup salu2 -- thorsten "Together we stand, divided we fall!" Hey you (Pink Floyd) --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
