For example, i have an entity of type "my_dog". I don't want bundle support for this entity and have a uri callback which provides a "dog/ID" uri.

At the moment it is not possible to provide remove all generated aliases for "my_dog". And thus also re-generating new url aliases once the pathauto pattern has been updated.

What about if we let entities provide a "uri prefix" property inside hook_entity_info().

So we could have like:

/**
  * Implements hook_entity_info().
  */
function my_dog_entity_info() {
  return array(
    'my_dog' => array(
       'label' => t('Dog'),
       'plural label' => t('Dogs'),
       'uri callback' => 'entity_class_uri',
       'uri prefix' => 'dog/',
       ...
    ),
  );
}

Comments

filsterjisah created an issue. See original summary.

filsterjisah’s picture

filsterjisah’s picture

Status: Active » Needs review
StatusFileSize
new794 bytes

Status: Needs review » Needs work
filsterjisah’s picture

Status: Needs work » Needs review

Woops, forgot to disable testing for 7.x-1.0 patch.

The last submitted patch, 2: pathauto_entity-uri_prefix_entity_info-2992487.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.