Multiple Views for single feature.

This is a forum to suggest new features for mojoPortal. 

This thread is closed to new posts. You must sign in to post in the forums.
4/29/2009 8:01:53 AM
Gravatar
Total Posts 2

Multiple Views for single feature.

If i don't miss sth,by default,a feature can only use a module control.(.ascx file in the feature folder)

But,i hope that we can enable a Single feature to consume multiple views.

For example,i wanna design a totally new UI for our existing Image Gallery feature but using the exactly same db schemas and data,then i just add a new site module control named GalleryX.ascx to the feature folder.After putting the feature on the page,i can then choose which ascx file to draw the UI of the feature via feature setting.(We can provide user a list of ascx files in the feature's root folder,let them choose what they like.)

It's quite easy On the implementation,we can add a new feature definition setting called "ControlSourceOnUse",if this setting had been set,we just use the setting value to override the default ControlSource of the feature.

Do u have any opinions?

 

4/29/2009 8:14:12 AM
Gravatar
Total Posts 18439

Re: Multiple Views for single feature.

My opinion is if you want to to use more than one view you load different .ascx files from inside single module.ascx based on settings or user action, and/or extend your feature with additional .apsx pages to support the different views as we do already in the forums, blog, web store and others.

The module control should be the single entry point to a feature. Inside it you can do whatever you like. 

Best,

Joe

4/29/2009 8:34:39 AM
Gravatar
Total Posts 2

Re: Multiple Views for single feature.

Thanks very much

I will take a look at the implementations of existing forum and webstore feature.

You must sign in to post in the forums. This thread is closed to new posts.