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

Patterns for non visible content

Vote:
 

I was thinking of using the pagedata class to create model items for just storing data which sit in the page tree but have no actual rendering. For example to give them the ability to create a list of authors to populate a dropdown or to be able to associate to a page via the ContentReference which I can then do funky stuff with.

However I was wonder if there are other better ways, or even if using blocks for this might be better. I have read that there are interfaces and objects at a lower level which would mean they don't have to be pages or blocks, but it doesn't seem like these are then easily accessible to edit in the UI, and really all I want is the all properties view for this content data.

Is there a better approach or is the quickest and simplest approach to just use pages or blocks and not create the views?

I think I can probably create some custom base classes to prevent these being draggable to content areas.

#85708
May 02, 2014 12:27
Vote:
 

I suppose in one sense I'm wondering if it is possible to inherit directly from ContentData in any meaningful way, or if it is possible to use BasicContent directly. Or is it just too much work in most cases.

#85709
May 02, 2014 12:37
Vote:
 

If you want your content to be editable from EPi, then you can use page blocks.
Otherwise you can use IContent: http://world.episerver.com/Documentation/Items/Developers-Guide/EPiServer-CMS/75/Content/Persisting-IContent-instances/

#85722
May 02, 2014 13:41
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.