Running a v4.7.1.1 site and could do with removing the "Content Channel" tab in a Umbraco user profile. It has created a little confusion, so could do with it disappearing.
It's not in the dashboard.config and can't see it in any other config file, so was wondering if anyone else could point me in the right direction.
The only problem is that this would be overwritten if you upgraded Umbraco.
2. Use code to hook into a back-office page event to auto-insert the same CSS, like so...
using System;
using System.Web.UI.WebControls;
using umbraco.BusinessLogic;
using umbraco.presentation.masterpages;
namespace Our.Umbraco
{
public class HideUserContentChannel : ApplicationBase
{
public HideUserContentChannel()
{
umbracoPage.Init += new MasterPageLoadHandler(this.InjectCss);
}
protected void InjectCss(object sender, EventArgs e)
{
var page = sender as umbracoPage;
if (page == null)
return;
var path = page.Page.Request.Path.ToLower();
if (!path.Contains("users/edituser.aspx"))
return;
var container = page.FindControl("body") as ContentPlaceHolder;
if (container == null)
return;
var css = @"<style type='text/css'>#body_UserTabs_tab02{display:none;}</style>";
page.Page.ClientScript.RegisterStartupScript(this.GetType(), "HideUserContentChannel", css, false);
}
}
}
There is one thing I do know, and that is, you are a gent Lee. pleased you got the Little Britain reference. :)
I'd thought about hiding the tab via CSS but didn't think about doing it the second way. I feared that something could be changed to invalidate the style. By that I mean, would the channel tab always be tab02 or someone come and tinker with styles. But in all honesty, it won't change in this project and I was over thinking about it.
I'm suprised there isn't options to turn it on/off, as it was orginally a plugin wasn't it? Doesn't matter.
Not sure if it was originally a plugin or not. I know it was there to support editing from MS Word and Windows Live Writer. Not sure how relevant those are these days?
With the ID for the CSS, it wouldn't change unless there were other code changes in the core (e.g. adding tabs before it, renaming the tab-bar).
Disable Content Channel Tab
Running a v4.7.1.1 site and could do with removing the "Content Channel" tab in a Umbraco user profile. It has created a little confusion, so could do with it disappearing.
It's not in the dashboard.config and can't see it in any other config file, so was wondering if anyone else could point me in the right direction.
Thanks
dust anyone? dust?
Hi Peter,
Dust... high in fat, low in fat? ;-)
There isn't a way to disable the Content Channel from the user edit screen, so you have 2 options:
1. Manually add the following CSS to the "/umbraco/users/EditUser.aspx"
The only problem is that this would be overwritten if you upgraded Umbraco.
2. Use code to hook into a back-office page event to auto-insert the same CSS, like so...
Cheers, Lee.
There is one thing I do know, and that is, you are a gent Lee. pleased you got the Little Britain reference. :)
I'd thought about hiding the tab via CSS but didn't think about doing it the second way. I feared that something could be changed to invalidate the style. By that I mean, would the channel tab always be tab02 or someone come and tinker with styles. But in all honesty, it won't change in this project and I was over thinking about it.
I'm suprised there isn't options to turn it on/off, as it was orginally a plugin wasn't it? Doesn't matter.
Thanks Lee. you rock.
Not sure if it was originally a plugin or not. I know it was there to support editing from MS Word and Windows Live Writer. Not sure how relevant those are these days?
With the ID for the CSS, it wouldn't change unless there were other code changes in the core (e.g. adding tabs before it, renaming the tab-bar).
Cheers, Lee.
is working on a reply...