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/',
...
),
);
}
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | pathauto_entity-uri_prefix_entity_info-2992487-7.x-1.0.patch | 794 bytes | filsterjisah |
| #2 | pathauto_entity-uri_prefix_entity_info-2992487.patch | 1.28 KB | filsterjisah |
Comments
Comment #2
filsterjisah commentedComment #3
filsterjisah commentedComment #5
filsterjisah commentedWoops, forgot to disable testing for 7.x-1.0 patch.