HI,

I've searched the forums, but am unable to find a solution to my problem...

Is there a way to remove selected items from the 'Create Content' page (node/add) without removing the ability to create the content? I can disable the items from the menu but can't find a way to remove them from the page.

I have links to create certain content types elsewhere on the site, so would like to remove the item from the list to avoid confusing my users.

A case in question is the forum. I only want my users to be able to create a new forum topic from the 'Post new forum topic' button in the forum.

Cheers

Paul

Comments

Ole Martin’s picture

Try to go to /admin/user/access and deactivate all "create xxx content" and "edit xxx content" (not forum) for the role of your users. ( authenticated user ) Then they have only one choise..

The free and open supportteam
Drupal i Norge - (DiN)
Ole Martin
http://www.drupal.no

fourtyfreak’s picture

Thanks for answering so quickly.

The problem is I don't want to stop my users from posting to the forum, I simply want to stop them from posting via the create content link...

If they post from the forum, the correct forum is automatically selected in the dropdown box. If they post via the create content link, they have to manually select the correct forum... My users are borderline technophobes, so I'd like to remove as many hurdles as I can. :-)

I appreciate this may sound a tad daft, but I've already had a few users posting to the forum root, because they weren't sure what to do.

Paul

--

.--./.-/..-/.-../ /--/./.-./.-./../-.-./-.-

TKS’s picture

If you don't mind hiding those options for ALL users, you can do this at http://yoursite.com/admin/build/menu. Just disable those menu items.

And if you need to preserve them for certain users, you could always create a custom menu with those link, then set that menu's block to be visible only for users with a particular role.

Hope that helps...
TKS

dman’s picture

Yeah. To push away programatically created menu items, make a new menu placeholder, place it there, and don't show the menu.
You can't delete, and disabling is tricky, but you can MOVE it somewhere hidden.

.dan.
How to troubleshoot Drupal | http://www.coders.co.nz/

wisdom’s picture

It depends on how the module you are using created the link:

1) At admin >> menus if the module has created the menu item link you could disable it.
2) If the above is not possible you need to go to that particular module (modulename.module file) code, modulename_menu function (hook_menu) and modify the menu item. The modification required is very slight.
3) If the above two are not possible it is because the menu link is created programmatically. In this case you need to find the section of the program that you using to make the necessary adjustment. This case is more challenging than the above two.

Online Business

fourtyfreak’s picture

Thanks to everyone for your advice.

It seems to me that the easiest way is to recreate the create content menu and node for my users and display only what I wish them to see.

Modifying the menu options is easy enough, I've already disabled certain content types in the menu (Forum and image) but the node/add page view still lists all the enabled content types (including Forum and image). Hopefully recreating this page in a static page do what I want. As I said, I don't want to disable the content type, only the reference to it in the create content menu and node/add page.

Thanks all.

Paul

--

.--./.-/..-/.-../ /--/./.-./.-./../-.-./-.-

halfiranian’s picture

Is that what you ended up doing, Paul? I'm in exactly your situation at the moment.

James

theresonant’s picture

Hi guys. I hope this isn't too late...

I tried a quite stupid solution, but worked perfectly.

Inside your module, in the function mymodule_node_info(), when defining your content, DO NOT specify name and description for your content types. Here's an example:

function mymodule_node_info() {
	return array(
		'mycontent' => array(
			           //REMOVE THIS :          'name' => t('My content'),
						'module' => 'mymodule',
			           //REMOVE THIS:            'description' => t("Add some new content."),
				)		
		);
}

So the only code remaining would be:

function mymodule_node_info() {
	return array(
		'mycontent' => array(
				'module' => 'mymodule',
				)		
		);
}

If you do this, Drupal will not render the link in the "Create content", yet the link "mysite/node/add/mycontent" is still valid.

Again, I hope this isn't too late, it's been quite a while since this thread was started.

theresonant’s picture

There's a small drawback here... The normal submission form is titled "Submit My content", but if you provide no name when defining the node, the title would remain "Submit", without specifying what exactly you submit. This isn't really very bad though, I guess...