How to remove text boxes/dropdowns from Edit Content page

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
Morlan

How to remove text boxes/dropdowns from Edit Content page

Post by Morlan »

I need to hide some items from the Edit Content page. I don't want users changing these settings:
Content Type:
Title:
Menu Text:
Parent:
Page Alias:
Template:
I understand that these are very important fields and that they can't removed, however, is there a way to grey them out or hide them?

I've looked at editcontent.php and understand that the following piece of code generates the HTML that creates these fields:

Code: Select all

?>
<div class="pageoverflow">
	<p class="pagetext"><?php echo $contentarray[$i][0]; ?></p>
	<p class="pageinput"><?php echo $contentarray[$i][1]; ?></p>
</div>
<?php
The above generates the following:
Menu Text:

I want the code to generate input type="hidden" so that the field are invisible.

Could somebody tell me which file generates this code so that I can alter it?

Thanks
Morlan

Re: How to remove text boxes/dropdowns from Edit Content page

Post by Morlan »

Image

These are the fields I'm talking about. The user doesn't need to change them as Navigation is handled by static HTML in the templates.
They also take up a lot of room on the edit content page.

There must be a way of altering the code so that it's generates input type="hidden"?

edit: I've found the piece of code that generates this. I changed it to hidden but the only problem is that it hides the whole Content box too. Ah well, I give up.
Last edited by Morlan on Fri Aug 19, 2005 3:48 am, edited 1 time in total.
simplyworks

Re: How to remove text boxes/dropdowns from Edit Content page

Post by simplyworks »

I"ve just started working with excellent system, but it seem to me your can set your clients website up with HTML BLOBs. then they would only be able to change the text.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: How to remove text boxes/dropdowns from Edit Content page

Post by calguy1000 »

It seems to me that a better way to handle this would be to create another permission "change page structure" or "alter content" or some such itellegently phrased permission and if the user doesn't have that permission to just remove these fields all together.

if the fields aren't set on the "commit" side of the code then it just doesn't update those fields in the content table.

Just my $0.02 CDN.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Locked

Return to “CMSMS Core”