Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Each standard Drupal entity, such as node
, user
, taxonomy term
, etc - have url
token group that contains many tokens, based on entity url information.
For example node
have those url alias tokens:
[node:url]
[node:url:unaliased]
[node:url:unaliased:absolute]
[node:url:unaliased:args]
[node:url:unaliased:brief]
[node:url:unaliased:relative]
[node:url:unaliased:path]
[node:url:absolute]
[node:url:args]
[node:url:args:value:?]
[node:url:args:keys]
[node:url:args:reversed]
[node:url:args:join-path]
[node:url:args:first]
[node:url:args:last]
[node:url:args:join:?]
[node:url:args:count]
[node:url:brief]
[node:url:relative]
[node:url:path]
But custom entities, created by Entity Construction Kit (ECK), provide no tokens, based on entity url alias, so ECK entities cannot be used as path part of Pathauto module.
How can I add url alias entities to custom ECK entities? Maybe this possible via some hack or external module?
Comments
Comment #2
johnny_aroza CreditAttribution: johnny_aroza as a volunteer and commentedHi @Murz this can be achieved,
Go to URL config(/admin/config/search/path) and select entities (/admin/config/search/path/entities) you can find your eck entity under AVAILABLE ENTITY TYPES ,
select your eck and then save config
now your eck will be listed in patterns(/admin/config/search/path/patterns) and can do the necessary changes.
Comment #3
MurzThe issue is about missing
url
tokens in ECK entities. I already do that you describe and have eck in list of patterns. But all eck items miss tokens likeeck:url:path
, so I can't get eck url for reuse it in another entity pattern.Comment #4
akalata CreditAttribution: akalata commented@Murz are you using 7.x-3.x and not 7.x-2.x? I'm cleaning up the queue in hopes of getting a 2.x release out, 3.x-specific issues may end up being ignored.
Comment #5
MurzI use 7.x-2.x, but ready upgrade to 7.x-3.x if it have the
url
feature.Comment #6
akalata CreditAttribution: akalata commentedSetting issue to 2.x then; there may not be a 3.x release (in order to put time towards the D8 version).