Custom Page -vs- Site Module

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
5/26/2009 7:50:11 PM
Gravatar
Total Posts 26

Custom Page -vs- Site Module


I just finished reading: http://www.mojoportal.com/overviewofcontentfeaturedevelopment.aspx

In this "Overview of Content Feature Development" Joe said...

Notice that in mojoPortal, all the pages in the menu are derived from the database and don't actually correspond to any physical .aspx pages. There is actually only one page that handles requests for all these content pages and that page is Default.aspx.

When I first read this quote, I thought that absolutely ALL content was delivered through Default.aspx, and thus only 1 ASPX page existed. However, upon closer reading, I see the small disclaimer, "...all the pages in the menu...". Which explains why there are certainly more than 1 ASPX pages in the code:

  • \Web\Secure\Login.aspx
  • \mojoPortal.Features.UI\Blog\ViewPost.aspx
  • \Web\SiteMap.aspx
  • \Web\Admin\PageLayout.aspx
  • etc


QUESTION: What are the differences between creating a Custom Page vs a Site Module (aka "Feature")?

MORE IMPORTANT QUESTION: How do/have you decided whether content should be on an ASPX page (inheriting mojoBasePage), or an ASCX user control (inheriting SiteModuleControl)?  I see that one of your models, is to have all the configuration/administration parts of code, go into ASPX pages, while the parts that your standard user sees goes into an ASCX.

Would you expand further?

 

thanks,

Michael

 

 

5/27/2009 5:28:17 AM
Gravatar
Total Posts 18439

Re: Custom Page -vs- Site Module

Hi,

Administration features are implemented outside of the content management not as content plugins so they do have physical pages and are not listed in the main menu but in a separate administration menu.

The main menu(s) is driven by the content system only and the content system is not designed to plugin physical .aspx pages. It can be done using fully qualified urls but it doesn't blend in correctly so as to highlight the current page in the menu. I do not recommend creating stand alone pages and trying to use them in the content system.

A content feature can have physical .aspx pages. Most features have .aspx pages for editing, and more complex features like the blog and forums have multiple supporting .aspx pages because you can't fit the whole feature in a .ascx. However all features have their entry point as a .ascx that can plug into the content system. From the .ascx it can link to its own supporting pages as needed passing the pageid and moduleid (and any other needed params) in the url keeps the menu highlighted correctly and those params can also be used to enforce security in the custom code for the feature. So for example the .ascx for the forums is just a list of forums and it links to .aspx pages to view threads and make new posts.

Hope it helps,

Joe

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