url of alias

so i have set up a bunch of alias for ease of getting various page lists to work right. however i'm having issues with the url's being a bit odd.

so for instance i'm here:

on that page i have a page list with aliases that are positioned underneath this page (3 relevant projects). the problem i'm getting is when i click on one of those page list items i'm getting the previous project name in the url like...


is there any way in the page list to get just the page name from the url? i.e. "alias-project-name" -- if i can do that i can write the url in the format i want. otherwise i'm not sure how to format this url correctly.


View Replies:
jhart replied on at Permalink Reply
any way to get the specific page name as it appears in the pretty url??? i.e. page-name-goes-here
ScottC replied on at Permalink Reply
i dunno, try doing Page::getByPath('your_path/path/path')->getCollectionName(); or split the string on / and select the last one(count($split) - 1) or similar.