El jue, 02-03-2006 a las 11:59 -0500, Doug Chestnut escribió:
>
> Thorsten Scherler wrote:
> > Hi all,
> >
> > I am looking into customizing lenya regarding the internal mapping of
> > assets in 1.4.
> >
> > I see that in our interface ResourcesManager we define the
> > RESOURCES_PREFIX.
> > final String RESOURCES_PREFIX = "resources";
> >
> > I assumed that I would set it in the DefaultResourcesManager
> > ResourcesManager.RESOURCES_PREFIX = "";
> > but no, since we use getResourcesURI() from package
> > org.apache.lenya.cms.publication;
> > public class Resource.
> >
> > protected String getResourcesURI() {
> > String resourcesUri = document.getPublication().getSourceURI() +
> > "/"
> > + ResourcesManager.RESOURCES_PREFIX + "/" +
> > document.getArea() + document.getId();
> > return resourcesUri;
> > }
> >
> > Meaning I need to implement a custom implementation of ResourcesManager,
> > where I will as well implement getResourcesURI().
> >
> > Further since we started to make the location configurable I would
> > suggest to add in publication.xconf:
> > <resource-dir src="/home/thorsten/resources"/>
> >
> > ...but on the other hand I think it really would make sense to treat
> > resources and content as the same since resources (img, pdf,...) in the
> > end *are* content.
> >
> > That means we just reuse <content-dir
> > src="/home/USERNAME/data/default"/>
> >
> > wdyt?
> +1
> This would be really handy, one could have an image module, pdf module,
> opendoc module (already exists), ..., and an asset module as a catch all
> for other resource types.
>
> Documents could easily be linked to as assets, Assets could easily be
> linked to by the site nav, and we only need one system of maintaining
> the relationships between the lot.
:)
Yeah.
I just tested by patching the ResourcesManager and setting the
ResourcesManager.RESOURCES_PREFIX = "content";
Now all resources go into the content dir to the related document. As
well what you wrote is write about documents now being assets.
If I go to the assets tab in the site area I now can see all files in
the content doc-id dir. :)
The only thing that is not working anymore is the display of the assets
(besides the documents). I assume that is because we have hardcoded
matches (trigger on resources) in global-sitemap and resources. :(
I am right now trying to refactor this.
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]