How can I remove "Sections Header" and "Separator" from the Content Type list?
Thanks in advance!
Pages: removing items from the Content Type list?
Re: Pages: removing items from the Content Type list?
First up, Why?...
Re: Pages: removing items from the Content Type list?
The website is for a client, and since the menu structure doesn't need Sections Headers and Separators I prefer to disable them.
Re: Pages: removing items from the Content Type list?
OK, well 2 ways, either do it with CSS, display:none or hack the PHP file to get them to go away, either way if it gets updated you will have to do it again, just tell them not to use them, or let them and charge them to fix it... 

Re: Pages: removing items from the Content Type list?
In what PHP file are these content types processed? I still prefer to remove them from the list 
CSS display:none is not an option because I don't want to hide the whole list, but only 2 options.
Thanks for the help.

CSS display:none is not an option because I don't want to hide the whole list, but only 2 options.
Thanks for the help.
Re: Pages: removing items from the Content Type list?
OK well I don't know exactly which file it is but it is in the admin folder, I would do a page edit/add thing and right click to view source find the part it is in then go thu the PHP files in admin folder till I found something that looked like it and put a number or some kind of marker there then look at page edit again to see if it shows, doing this till I get the right part then comment it out or ? to get it to not show...
Re: Pages: removing items from the Content Type list?
Thank for the quick replies. In addcontent.php and editcontent.php the contenttypes are fetched via $gCms->contenttypes. I'm not sure where this array is build, but I used a quick hack to exclude the sectionheader and separator from the list.
addcontent.php and editcontent.php:
addcontent.php and editcontent.php:
Code: Select all
foreach ($gCms->contenttypes as $onetype)
{
if ($onetype->type != 'sectionheader' && $onetype->type != 'separator')
{
$contentops->LoadContentType($onetype->type);
$type_obj = new $onetype->type;
$typesdropdown .= '<option value="' . $onetype->type . '"';
if ($onetype->type == $content_type)
{
$typesdropdown .= ' selected="selected" ';
$cur_content_type = $onetype->type;
}
$typesdropdown .= ">".($type_obj->FriendlyName())."</option>";
}
}