I used cck to create a new content type with a number of fields and arranged the order of the fields. There are several grayed out node items that can be positioned as well. However, there are no position markers for theme select. Users with a role that permits theme selection see the theme selection partway through the various fields.

Likewise there is no position marker for locations so if the node location rather than field of location type is used, the location entry appears at the top before the first field and cannot be positioned specifically where needed.

Is there a way to show these items?

Thanks,

Izzy

Comments

markus_petrux’s picture

If this section in the node edit form is added by another module, then this module needs to implement hook_content_extra_fields() in order to tell CCK it should show the item in the "Manage fields" screen.

Examples on how hook_content_extra_fields() works can be found in CCK code itself.

izmeez’s picture

Markus,

Thanks for this reply. Can you or someone else help me in terms of how to direct my question?

In terms of theme selection by role, I believe that is in core, so maybe I should open this issue in core under some component?

It sounds like I should also open this issue under the location module.

Is that correct?

Thanks,

Izzy

izmeez’s picture

Status: Active » Closed (fixed)

I have gone ahead and opened two related issues:

One for a theme select anchor, http://drupal.org/node/492948

and one for a location anchor, http://drupal.org/node/492956

I am also changing the status of this item to closed. I hope this is the right thing to do.

Thanks for your help.

Izzy

izmeez’s picture

Even though I closed this ticket, I discovered something else that relates to the original problem I described where the theme selection was appearing in between some of the unique cck fields that were created.

I created a field group, 'mytype_details" and moved all the unique cck fields so the were indented as part of that new field group. I then found that the theme selection appears on its own further down the submission form as one would expect.

This came about while resolving another issue as described at http://drupal.org/node/373983#comment-1710062 but I thought it might come in handy if someone is faced with the same problem of the theme selection showing up in an odd position.

Izzy

Anonymous’s picture

Status: Closed (fixed) » Active

I put this in location.module, it shows up in Manage Fields, BUT it doesn't work:

 /**
 * Implementation of hook_weblinks_extra_content().
 * Tell CCK about our fields so the user can manage them.
 */
function location_location_extra_content() {
  $extras = array();
 
  $extras['location'] = array(
    'label' => t('Location'),
    'description' => t('Location data.'),
    'weight' => 100,
    );

  return $extras;
}

/**
 * Implementation of hook_content_extra_fields.
 * Tell CCK about our fields so the user can manage them.
 */
function location_content_extra_fields() {
  $extras = module_invoke_all('location_extra_content');
  return $extras;
}

Does anyone know the solution? How to f-ing move the location fieldset in a preferred order?

markus_petrux’s picture

Status: Active » Fixed

hook_content_extra_fields() get the $type_name as argument, so it should look like this:

/**
 * Implementation of hook_location_extra_content().
 * Tell CCK about our fields so the user can manage them.
 */
function location_location_extra_content($type_name) {
  $extras = array();

  $extras['location'] = array(
    'label' => t('Location'),
    'description' => t('Location data.'),
    'weight' => 100,
    );

  return $extras;
}

/**
 * Implementation of hook_content_extra_fields.
 * Tell CCK about our fields so the user can manage them.
 */
function location_content_extra_fields($type_name) {
  $extras = module_invoke_all('location_extra_content', $type_name);
  return $extras;
}

Also, you cannot only drop this stuff in the code and expect it to work for existing content types. You should first clear the content cache.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.