How to tell if Page is a Content Page vs Admin?

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.
8/11/2010 2:31:42 PM
Gravatar
Total Posts 76

How to tell if Page is a Content Page vs Admin?

I am making a control that will sit on the layout.master.( some banner image and background image control )

I would like to make the control not render when on an admin/edit pages, as it chews lots of space and make editing controls look poor 

I can't just use the if ( Page is CmsPage ), as some custom blog pages would not fall under that umbrella.

I was thinking of making any  admin/edit page being mojoAdminBasePage and any content page a mojoContentBasePage.

both then inheriting from mojoBasePage.

 

This would really make keeping my project in sync more "merge"- intensive :(  

 

 

Thoughts?

 

 

8/12/2010 11:03:08 AM
Gravatar
Total Posts 18439

Re: How to tell if Page is a Content Page vs Admin?

I will ponder this and post again soon once I've decided on a solution. Maybe we just need a NonCmsPage rather than AdminBasePage or EditBasePage, but whatever convention once it is documented it is still going to be possible for others to develop features that don't follow the convention, so there isn't really a perfect solution, but I do think we can at least do something like this for included features.

8/12/2010 1:10:05 PM
Gravatar
Total Posts 76

Re: How to tell if Page is a Content Page vs Admin?

Thanks for thinking about it~

Another point of problems for me in the past has been some of my content pages need  to override module wrappers to allow it render outside of the CmsPage, 

if we had a Page type that was specifically for displaying content and one specifically for admin, then there would be no reason to need to force ModuleWrappers to render outside of the 1 CmsPage.

Just some more thoughts... 

thanks for the great work~!

:)

8/16/2010 9:02:51 AM
Gravatar
Total Posts 18439

Re: How to tell if Page is a Content Page vs Admin?

I've changed admin and edit pages to inherit from NonCmsBasePage and made ModuleWrapper hide itself by default on NonCmsPages.

This is in the repository.

Best,

Joe

8/16/2010 9:08:52 AM
Gravatar
Total Posts 76

Re: How to tell if Page is a Content Page vs Admin?

Thanks!

I saw it come across repo this morning. Much thanks! 

I hope this will come in-handy for others...

 

Warner

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