Can't seem to be able to hide the nodewords meta tag fieldset with this module.

Simply Node Add seems to start out with a zero weight, but upping that didn't help.

It's a bummer because Nodewords just has one "administer meta tags" permission, so you're stuck with it on all content types if it's granted... not your problem though.

Comments

doublejosh’s picture

PS: typo in title.

fabianderijk’s picture

You can add custom fields with implementing the hook_simplify_node_add_gettypes

function myModule_simplify_node_add_gettypes() {
  $field_types = array(
    'access' => array(
      'fieldname' => t('title'),
    ),
    'unset' => array(
      'fieldname' => t('title'),
    ),
  );
}

That should work. This hook must be used for all non core fields.

ludo.r’s picture

Version: 6.x-1.4 » 6.x-1.5
Component: Code » Documentation
Category: bug » support

I dont get it.

What should i do for XML sitemap for example?

I tried

	$field_types['access']['#content_extra_fields']['xmlsitemap'] = t("XML sitemap");
	$field_types['unset']['#content_extra_fields']['xmlsitemap'] = t("XML sitemap");

Or

	$field_types['access']['xmlsitemap'] = t("XML sitemap");
	$field_types['unset']['xmlsitemap'] = t("XML sitemap");

Do i have to put the same array as in $form?

What does $field_types['access'] mean? And $field_types['unset']?
Do we need to use both at same time or just one?

Then, will i have a new option for XML sitemap in admin/settings/simplify_node_add, or will it be simply removed from the form?

I'm a bit lost.

ludo.r’s picture

Okay im a bit further.
The function should return the array :

return $field_types;

The settings page now display "XML sitemap". But it doesnt work.

I check "XML sitemap", then save.
With a little debug, i see the function simplify_node_add_form_alter() tries to unset or modify access, but nothing happens.

I think its because the xmlsitemap is not at the root of the form.

Could someone confirm that issue?

And how to get it work?

By the way, the hook example should be updated with the return, otherwise i think many people wont be able to use their hook.

MattWithoos’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)

No longer supporting 6.x unless the community provides a patch.