When rendering content using the Cacher, paths to components/elements attached to the content are rendered with the path:
/wps/wcm/connect/Site/SiteArea/resources/first char of hash/second char of hash/hash/component filename
However when rendering content inside a JSP using WCM API the paths are:
How can I get paths similar to the Cacher when using the API?
I have tried the setPrefix function of RenderContext and various other alterations to paths when creating a context but with no luck.
Any help would be greatly appreciated.
This topic has been locked.
1 reply Latest Post - 2012-01-27T05:49:03Z by sejast
Pinned topic Component Paths in rendered content
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2012-01-27T05:49:03Z at 2012-01-27T05:49:03Z by sejast
sejast 0600025A1W1 PostACCEPTED ANSWER
Re: Component Paths in rendered content2012-01-27T05:49:03Z in response to ___rob___Hi Rob,
Pre-rendering and and rendering use different mechanisms to access resources based on what information is available at render time and how the content is structured on the file system or in the DB repository.
In the case of normal rendering, we can use the unique ID of a resource in the repository directly to access it. In the case of pre-rendering using the Cacher module, the resources are stored in the directory relative to the containing content item.
Since the resource models are so different, there isn't a way to use one URL in the other rendering mode.
Could you explain what you're trying to do? Maybe there's another way to achieve it.