Seperate layout for homepage

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/23/2011 10:55:01 AM
Gravatar
Total Posts 6

Seperate layout for homepage

Hello, I am new to MojoPortal.

I'm looking for a way to create a seperate Homepage layout than the rest of the site. So I can include extra elements to the homepage, but not affect the rest of the site.

I don;t want to create a whole new skin for the homepage, just a layout.master file if that's possible. How would I go about it?

 

Thanks for your help.

3/23/2011 11:07:07 AM
Gravatar
Total Posts 1203
Proud member of the mojoPortal team

Help support mojoPortal!
Add-on modules

Re: Seperate layout for homepage

The supported way to do this is to enable "Allow Setting Skin for Page" in site settings, and use a different skin for the home page. That said, if you only need changes to layout.master, you can just copy your existing skin to a different name, make the desired changes to the layout.master for the homepage, and leave the other CSS alone. Then the only thing you will need to remember is make any future CSS changes (due to upgrades, etc.) to both of the skins.

Hope that helps.

Jamie

3/23/2011 11:16:14 AM
Gravatar
Total Posts 6

Re: Seperate layout for homepage

Hi thanks for yoru reply.

But it Seems really bad doubling up all the whole skin just for the layout.

Is there not any .net script that will write content based on what page you are on.

e.g If filename default.aspx then show this content

<% if pagename = "default.aspx" then %>

 

something like this?

 

All I want to do is add an extra div??

 

Thanks again

3/23/2011 11:29:13 AM
Gravatar
Total Posts 18439

Re: Seperate layout for homepage

Hi,

It is possible to create separate skins that share the same css files. If you read the article Understanding the style.config file, it explains about scenarios where you might store the css files in a common location and use them in multiple skins.

Also note that in the next release of mojoPortal it will be possible to have a page specific css class added to the <body> which will make it easier to style specific pages a little different while using the same skin (though that doesn't give a way to add extra markup, you would still need a different skin to use a different layout.master).

Hope it helps,

Joe

3/23/2011 11:41:12 AM
Gravatar
Total Posts 6

Re: Seperate layout for homepage

I've read about the style.config. So how would I go about this?

 

I want to create a seperate skin, but with reference to another skins css and images and all other files ... bar the layout.master file

 

thanks.

3/23/2011 11:58:20 AM
Gravatar
Total Posts 18439

Re: Seperate layout for homepage

You could create a folder somewhere like /Data/Sites/1/commoncss

put most of your css files there along with any images they reference. In the skin folder you must still include the style.config, layout.master, theme.skin, favicon.ico and IESpecific css files, but the rest of your css could go into the common folder then configure the paths in style.config as discussed in the article.

The style.config would be the same in both of your skins but each would need its own copy.

Hope it helps,

Joe

3/23/2011 12:01:25 PM
Gravatar
Total Posts 6

Re: Seperate layout for homepage

Ok thanks Joe

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