Closed (fixed)
Project:
Country Pages
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
2 Apr 2015 at 09:47 UTC
Updated:
16 Oct 2015 at 11:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
alan d. commentedRelated:
https://www.drupal.org/project/pathauto_entity
#1330546: Pathauto should work with all entity types
If pathauto entity works, there is probably nothing required here :)
Comment #2
clemens.tolboomThe countries do not appear on http://drupal.d7/admin/config/search/path/entities
countries.module needs this patch #2472397: Add country uri to entity info
Hope Alan finds some time to review so assigning :p
Comment #3
alan d. commentedhehe: I see an entity alter is needed here too (bypassing the need for token)
Comment #4
clemens.tolboomThanks for the quick reply. I tried the uri first but thought token is better as it is about using tokens. OTOH I'm interested in rest. And entity_info_alter was doable for this module. But why not add it to countries module?
I'm fine with doing it in this module :-)
Attached patch uses
$country->iso2Comment #5
clemens.tolboomJust a note: both iso2 as cid are accepted as ID
Comment #6
alan d. commentedSince countries doesn't have a front end page view, this is actually the perfect place for this functionality. The token value is icing on the cake for other purposes (whatever these actually are).
Comment #7
webflo commentedComment #8
webflo commentedComment #9
clemens.tolboomComment #10
alan d. commentedThis should be safe to commit if path auto still works without the token patch in the countries queue. :)
No local environment to test myself.
Comment #12
clemens.tolboomThis patch somehow slipped away. I've tested this on a site and it works as advertised.