ModuleWrapper not working

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.
3/4/2010 4:25:23 PM
Gravatar
Total Posts 190

ModuleWrapper not working

Hi All,

Anyone know why <portal:ModuleWrapper ID="m32" runat="server" ConfigureModuleID="32" /> wouldn't be working? I know it was working a week or two ago, but I got back to work on this page using the ModuleWrapper and it doesn't seem to want to show up. No errors or anything. If I view source on the rendered page there is just nothing there. (ModuleID is correct and exists.)

Thanks,

John

3/4/2010 4:39:49 PM
Gravatar
Total Posts 2253

Re: ModuleWrapper not working

Hi John,

You aren't looking for the Module to show up on an admin page are you? If so, mojoPortal 2.3.3.9 has changed this functionality so that the ModuleWrapper control only works on CMS pages, not admin pages.

HTH,
Joe D.

3/4/2010 7:49:27 PM
Gravatar
Total Posts 190

Re: ModuleWrapper not working

Actually, it's on a custom page (inherits mojo base page) that I'm using for something else, not admin related. There's a custom module that is displayed on many pages of my site and I had it included on a couple of custom pages as well. Is this functionality available by some other method?

3/5/2010 7:05:47 AM
Gravatar
Total Posts 18439

Re: ModuleWrapper not working

If you study the control you will see there is not much to it so you could easily create your own version and change the logic as you see fit. Just create your own user control and copy the logic from Web/Controls/ModuleWrapper.ascx.cs and adjust it as needed.

The change I made recently was in adding this line of code so it will only render on CMS pages

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

CmsPage is the class behind Default.aspx which is the page that serves all CMS pages but not admin or edit pages.

Hope it helps,

Joe

3/5/2010 8:05:07 AM
Gravatar
Total Posts 190

Re: ModuleWrapper not working

Sounds easy enough. Thanks for the tip. Just out of curiosity, why the limitation? It seemed like a handy feature.

3/5/2010 2:55:10 PM
Gravatar
Total Posts 190

Re: ModuleWrapper not working

Yes indeed, it was very easy!

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