Try our conversational search powered by Generative AI!

What is the difference between ContentArea type and IList<ContentReference> type?

H F
H F
Vote:
 

It seems to me they all can be used to provide the references to the content items, no? then what is the difference? when should I use one or another?

thank  you for the explanation

#189673
Mar 22, 2018 21:01
Vote:
 

Two BIG differences: Content Area supports PERSONALIZATION (via visitor groups) and DISPLAY OPTIONS while IList<ContentReference> doesn't support either. Most authors like the flexibility that Content Area offers when it comes to dynamic content. 

Other than that Content Area client side model is more complex whereas IList<ContentReference> is more like an array of references ids. Content Area doesn’t implement the IEnumerable interface but needs to use FitlteredItems to get all the items. Content area also allows to create new blocks from the property itself. 

#189674
Mar 22, 2018 21:32
H F
Vote:
 

Great, 

thank you Aniket.

So, what would be then to reason to use IList? if ContentArea offers much functionality in the package?

#189675
Edited, Mar 22, 2018 21:33
Vote:
 

I'd say semantics. Perhaps performance as well, you could cache the IList<ContentReference> harder, seeing as it lacks personalization. But generally, if for example this list of ContentReferene for some reason won't be directly rendered, but rather just passed to the client or used as data in the controller for the content, then you know you don't want any of the additional features ContentArea provides. So it offering more functionality is actually just more confusing for the editors, because you'd be ignoring it.

#189694
Mar 23, 2018 7:20
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* 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.