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.
salu2
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]