Giving SearchResults.aspx a PageID so ModuleWrappers work

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.
7/2/2010 12:16:11 PM
Gravatar
Total Posts 76

Giving SearchResults.aspx a PageID so ModuleWrappers work

I have been laboring to customize some of the pages that have physical files in my project.

I have some content I would like to add to the search ( and some other pages ).

However using the Module Wrapper doesn't work on those pages since its not a CMSPage.

Is there a way simple way to make it so I can add/edit modules on these pages ( SiteMap, Search, ... ) 

 

( i obviously can go in and modify layout.master.cs, and some other files... but then keeping the project sync becomes more difficult ) 

Thoughts?

7/5/2010 7:42:07 AM
Gravatar
Total Posts 18439

Re: Giving SearchResults.aspx a PageID so ModuleWrappers work

Hi,

As of mojoPortal 2.3.4.5, if you are using a ModuleWrapper in left or right sides, you can enable it to show by adding these to your user.config

<add key="ShowLeftColumnOnSearchResults" value="true" />
  <add key="ShowRightColumnOnSearchResults" value="true" />

and touch Web.config to make it reload the settings.

However it is not a site specific setting so it would affect all sites in an installation of mojoPortal.

Hope it helps,

Joe

7/6/2010 3:09:21 PM
Gravatar
Total Posts 76

Re: Giving SearchResults.aspx a PageID so ModuleWrappers work

I still run into the problem with the ModuleWrapper only working on CMS pages.

 

in the PageLoad() of the ModuleWrapper: 

            // don't render on admin or edit pages
            if(!(this.Page is CmsPage)) { this.Visible = false; return; }

 

I can rip this out... but i really think i need the page to be a CMS page... so i can use the modulewrappers, and set the main menu to show, so i can set the skin.

 

Any thoughts?

7/8/2010 7:30:54 AM
Gravatar
Total Posts 18439

Re: Giving SearchResults.aspx a PageID so ModuleWrappers work

Hi,

I had forget about that check inside ModuleWrapper. I will add a property that can be set on the ModuleWrapper ShowOnCmsPagesOnly which will default to true but allow you to set it to false to change the behavior.

Best,

Joe

7/8/2010 2:51:38 PM
Gravatar
Total Posts 76

Re: Giving SearchResults.aspx a PageID so ModuleWrappers work

Thanx Joe, 

 

That is what I ended doing in my code as well.

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