November Happy Hour will be moved to Thursday December 5th.

Change MVC view for pages when used in ContentArea

Vote:
 

MVC only:

For content areas it's possible to drop both blocks and pages. But how do I change which view is used for pagetypes when they're put inside a ContentArea rather than being viewed as a regular page?

Example: I have a "product page" which can be viewed as a standard page. However, the same product page can also be used in a list-view, where we only want to show title, thumbnail and price.

#74364
Aug 26, 2013 12:38
Vote:
 

Hi

If I understoof you correctly you want to have different rendering for your "product page" depending where it is used, content are, list, etc

You can achieve this by registering different renderings based on a tag string, see http://world.episerver.com/Blogs/Johan-Bjornfot/Dates1/2012/9/EPiServer-7--Rendering-of-content/
Read the comments too if you don't know where you would do the registering.

This way you can render the "product page" differently depending where it is used.

If unclear I can later post some code here too.

#74403
Aug 27, 2013 12:58
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.