right wait to add feature styles?

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/6/2011 1:27:09 PM
Gravatar
Total Posts 31

right wait to add feature styles?

hello,

does anyone know the right way to add features custom styles. like "store demo" the is added to the page header but i can't find how to accomplish this.

i could add my style directly into the page but i don't feel much to do this because when i do this none of my pages would be valid html anymore.

at this moment i am using this code:

            StyleSheet stylesheet = (StyleSheet)Page.Master.FindControl("StyleSheet");


            if (stylesheet == null)
            {
                stylesheet = new StyleSheet();
                Page.Master.Controls.AddAt(0, stylesheet);
            }
            if (stylesheet.FindControl(Id) == null)
            {
                Literal cssLink = new Literal();
                cssLink.ID = Id;
                cssLink.Text = "\n<link href='" + file + "' type='text/css' rel='stylesheet' media='screen' />";

                stylesheet.Controls.Add(cssLink);
            }

i found it in the webstore.ascx.cs code and changed it to add the Stylesheet element if it doesn't exists because, this element is replaced by the stylesheetcombiner in the new skin versions.

King regards,
Laurence Mommers

7/7/2011 7:23:44 AM
Gravatar
Total Posts 18439

Re: right wait to add feature styles?

Hi Lawrence,

That code has actually been removed recently. StyleSheet is a control that was used in mojoPortal a very long time ago but was replaced with StyleSheetCombiner. If you need additional CSS for a custom feature I suggest create a css file in your skin folder and include it from style.config.

If you are just trying to make your feature styled with standard styles like most features you may want to look at the latest example code in our Hello World tutorials (or our Codesmith templates) which has been updated to show the use of our new set of container panels.

Hope that helps,

Joe

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