LocationResources vs URL generation

I have a Collection with a number of LocationResources inside it. I’d like to make a page for each of these locations but would like to use a different URL scheme to the one that’s being generated (or should I say ‘not generated’ by MODX.

On the surface it seems that all generated links to resources skip the normal URL generation. I have the use_alias_path system setting enabled but all URLs generated are at the top level instead of under my /locations/ path. (Working everywhere else in the site.) I’ve also double checked the database and my Collection resource has ‘alias_visible’ set to ‘1’.

Also, I have the html Content Type set to have no extension and while all other pages play fine, my location pages have a .html suffix (the default, but not what I’m after).

I presume the fact that it’s a “LocationResource” is tripping up the logic and it’s somehow bypassing the default URL generation.

Any hints or tips on where I could look next?

If all else fails I’ll use CustomRequest to set up a page to handle this and pull the details in, but that seems like overkill if I don’t have to do that…

I can’t reproduce this behaviour.

The full alias path of the resource is generated by the function getAliasPath() of the class modResource and is called when you save a resource (function save()).

The alias path is saved to the column uri of the database table (modx_site_content) and is then used to generate the url (makeUrl()).

As Location extends modResource (class Location extends modResource { ... }) and doesn’t override the save method, it should work the same for LocationResources.