Adding entity content to a custom category

Im trying to add certain weapons and entity’s to a custom category I have made I think it should
look something like this.(The code below just breaks the spawn menu)
Thanks for any help in advance


hook.Add( hookName, "AddEntityContent", function( contentPanel, tree, node )
	table.insert( contents, {
		type = "weapon",
		spawnname = "weapon_smg1",
		nicename = "SMG",
		material = "entities/weapon_smg1.png",
	} )
end )