AlwaysShowLeftColumn except for one page (is it possible)

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.
5/8/2012 7:34:04 AM
Gravatar
Total Posts 199

AlwaysShowLeftColumn except for one page (is it possible)

I have a site and in the master I do have AlwaysShowLeftColumn="true"

the problem is I have only one page on the site that I need to make use of the full width and the left column needs to go away.

Is there an easy way to do this?

I wanted to avoid adding the left side to the site as an "htmlcontent feature" on all pages then just turning off the page I need.

Any ideas would be appreciated.

5/8/2012 11:31:46 AM
Gravatar
Total Posts 1203
Proud member of the mojoPortal team

Help support mojoPortal!
Add-on modules

Re: AlwaysShowLeftColumn except for one page (is it possible)

I would probably use a separate skin for that page (it can look identical but just be a different name). You can make the maintenance of multiple skins easier by using a single set of CSS as outlined in the Understanding the style.config document page.

Jamie

5/8/2012 11:45:14 AM
Gravatar
Total Posts 42

Re: AlwaysShowLeftColumn except for one page (is it possible)

Agree with Joe - just duplicate your skin. Another option would be to use jQuery to hide the left site and adjust the middle and right columns.I would attach this to a body class... haven't tested it, but something like:

$('.myBodyClass').function(){
$('.leftside').hide();
$('.rightside').width('460');
$('.center-rightandleftmargins').width('500');
}

Yes this would fail without js, but if you're not too concerned with the left column when it fails, it's a quick and dirty fix.

 

5/9/2012 2:49:18 PM
Gravatar
Total Posts 199

Re: AlwaysShowLeftColumn except for one page (is it possible)

thanks for the help!

Before your post I was actually trying to do something crazy with a code block below, but the "<portal:StyleSheetCombiner"  will not accept a variable from a session like this: AlwaysShowLeftColumn="Response.write(Session["LabelLeftOpen"] );".

I thought it would be cool if I could add a few if then statements based on page and have it go true or false.

 <%

string url = HttpContext.Current.Request.Url.PathAndQuery;

if (url == "/Default.aspx?pageid=14")
{

Session["LabelLeftOpen"] = "AlwaysShowLeftColumn='false'" ;

}

else
{

Session["LabelLeftOpen"] = "AlwaysShowLeftColumn='true'" ;

}

%>

 

7/5/2012 5:21:12 PM
Gravatar
Total Posts 21

Re: AlwaysShowLeftColumn except for one page (is it possible)

Just had the same issue myself. I simply added the following to the html in the center panel of the page I didnt want the left menu on.

 

<style type="text/css">
#ctl00_divLeft{display:none;}

</style>

 

Obviously check that your left column is rendering with the same name and be aware it will remove the whole left column not just the menu. Worked a treat for me.

 

Hope it helps

Damian

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