Force Left and Right Content to be shown?

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/19/2010 1:56:50 PM
Gravatar
Total Posts 76

Force Left and Right Content to be shown?

Not sure of a great way to explain this. but here we go:

 

I have taken the Blog Module and copied it into my own project and have been modifying it.

I needed to be able to force the Left Column to show as I am adding controls that are not "modules" into the column. ( not adding a column to the center content so it looks like a left... that wont work for me for s

But during LoadSideContent() in mojoBasePage, since there are no modules registered with the PageSettings for that column, the column will not show.

So i have a wrote a simple public function to access the properties as need them.

in mojoBasePage

public void ForceSideContent(bool? includeLeft, bool? includeRight)
{

     if (includeLeft.HasValue)
      this.forceShowLeft = includeLeft.Value;

     if (includeRight.HasValue)
      this.forceShowRight = includeRight.Value;

}

Is there a better way to add non "module" type/level controls and not have to extend mojoBasePage?

example: I built an Ajax Achive control, that uses the info from the blog module on the page, it as well as other small controls are added to the left side.

 

Thoughts?

Warner

8/19/2010 2:02:35 PM
Gravatar
Total Posts 18439

Re: Force Left and Right Content to be shown?

you should not modify mojoPortal source code period or you will lose the ability to upgrade.

It's fine to fork a feature like the blog if you cloned it correctly so that it is completely separate from the original blog and does not share code or tables or resources or anything at all with the original blog.

Don't be tempted to add methods to mojoBasePage, you could copy methods from mojoBasePage into your custom page with different method names and modify to meet your needs then just call your own methods instead of the mojoBasePage methods.

Hope it helps,

Joe

8/19/2010 3:21:09 PM
Gravatar
Total Posts 76

Re: Force Left and Right Content to be shown?

I agree modifying mojoBasePage could be a serious problem for maintaining it going forward...

But what about extending it?

I need to be able to Force the left & right column be visible.  the only "easy" way i could see is just extending, and opening up access to the private vars i need to modify?

8/20/2010 9:15:18 AM
Gravatar
Total Posts 18439

Re: Force Left and Right Content to be shown?

Yes, if you want to be able to re-use your custom page logic then you can make a class that inherits from mojoBasePage, add your custom methods and properties and then inherit from that class in your custom blog pages instead of mojoBasePage.

Note also that you can specify on the StyleSheetCombiner control in layout.master 

<portal:StyleSheetCombiner AlwaysShowLeftColumn="true" AlwaysShowRightColumn="true"...

this will make the master page show the side columns even if they have not content system content, but it will affect all pages using the skin.

Hope it helps,

Joe

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