Adding new control in layout.master

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.
9/14/2010 2:21:03 AM
Gravatar
Total Posts 2

Adding new control in layout.master

Hi, I'm trying to add new asp.net dropdownlist in layout.master page but it does not appear, I created a user control for this dropdownlist in "Controls" folder and placed it in wrapheader div like this:

<portal:DropDownListAccounts id="drpdwn" runat="server"/>

but it does not appear, I noticed also that even plaint text that has been added to layout.master page does not appear too.

Can you help please.

 

Regards.

9/14/2010 7:04:08 AM
Gravatar
Total Posts 108
Community Expert

Re: Adding new control in layout.master

What code did you use for create the control?, did you make the includes of the mojo portal namespaces?.

 

include this in your control

 

<%@ Import Namespace="mojoPortal.Business" %>
<%@ Import Namespace="mojoPortal.Business.WebHelpers" %>
<%@ Import Namespace="mojoPortal.Web.Framework" %>
<%@ Import Namespace="mojoPortal.Web.Controls" %>
<%@ Import Namespace="mojoPortal.Web.Editor" %>
<%@ Import Namespace="mojoPortal.Net" %>

 

and then include the control in the portal using the admin features

9/14/2010 9:11:16 AM
Gravatar
Total Posts 2237

Re: Adding new control in layout.master

Hello,

It sounds to me like you are not editing the correct layout.master file. Make sure you are editing the one in \Data\Sites\[SiteID]\skins\[SkinName]. Where [SiteID] is the ID of your site (usually 1) and [SkinName] is the name of your skin.

HTH,
Joe D.

9/14/2010 10:07:23 AM
Gravatar
Total Posts 2

Re: Adding new control in layout.master

Hi, I'm using Styleshout-refresh skin and I'm trying to modify layout.master that found in "Web\Data\Sites\1\skins\styleshout-refresh"(My site id is 1 I have no other ones), but anything I add does not appear! What did I miss?

9/14/2010 10:15:31 AM
Gravatar
Total Posts 1203
Proud member of the mojoPortal team

Help support mojoPortal!
Add-on modules

Re: Adding new control in layout.master

Sounds like it may be a caching issue. Make sure these directives are in your user.config:

<add key="CacheCssOnServer" value="false"/>
<add key="CacheCssInBrowser" value="false"/>

Once you are done getting the skin configured, you'll want to set these values to "true" for production.

9/14/2010 10:38:05 AM
Gravatar
Total Posts 18439

Re: Adding new control in layout.master

master page is not affected by CSS cache, most likely the change you are making to the layout.master file is causing an error so it loads a failsafe master page to prevent crashing the page. You should look in the mojoportal error log for the error

Administration > System Log

most likely it is because you are not registering your control correctly.

you should not be using <portal: as a prefix for your custom controls

this page has information at the bottom about how to register a custom usercontrol inside layout.master

http://www.mojoportal.com/usercontrols-as-include-files.aspx

Hope it helps,

Joe

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