i have two component in CP which uses same schema and CT but inserted different position in page. i want the components to be rendered inside some condition in different places in page. but i cant use rendercomponentpresentationbyview("viewnme") because it will render second component with same view here itself.

please let me know t best way to render..

1 Answer 1


I think the only way to do this is to implement a custom IComponentPresentationRenderer, or add extension methods on the existing one, with some logic to separately identify your component presentations. This can normally be configured on your PageController either through dependency injection, or explicitly setting it.

  • I notice the (maybe recent) componentpresentation tag on the Java side has a start and stop attribute. Could that be used to place some of the same matching CP in one spot and the rest elsewhere on the page? Aug 3, 2015 at 15:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.