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

Transferring information

Vote:
 

Hi, I have the following scenario:

Inside my ContentArea, I am rendering Rows (RowBlock that contains a ContentArea only). Inside each row, I want to have one to four other blocks (of different types).

This works fine, but based on the number of blocks in a row, I want to load a different image size (most of the blocks have their teaser image). I could do this easily, if I were to use RenderPartial. In that case I would just pack up my ViewModel the way I want it and sing :). However, I need to render different types of blocks, so instead, I am using:

@{ Html.RenderContentData(@block, true); }

Block is of type SiteBlockData : EPiServer.Core.BlockData.

Is there a way to transfer the info about the size of the image or the image Url to the @block?

Do I have to use the alternative and check of which type is my block and use corresponding partial view?

Thank you in advance,

Marija

#64954
Jan 16, 2013 18:29
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.