• 1 reply
  • Latest Post - ‏2012-01-27T05:49:03Z by sejast
2 Posts

Pinned topic Component Paths in rendered content

‏2012-01-27T00:31:33Z |

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:

/wps/wcm/connect/hash/component filename

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.
Updated on 2012-01-27T05:49:03Z at 2012-01-27T05:49:03Z by sejast
  • sejast
    1 Post

    Re: Component Paths in rendered content

    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.