Trying to get the page url by page handle

Permalink 2 users found helpful
Hello
I was trying to get the page url by page handle. I do know that it can be done by page ID. But I need this done by page handle as I don't have the page ID.

Thanks in advance for your help.

Rony

ronyDdeveloper
 
ideasponge replied on at Permalink Reply
ideasponge
Here you go
$page = Page::getByHandle('hello_page');

Source:http://www.concrete5.org/community/forums/customizing_c5/page-get-b...
ronyDdeveloper replied on at Permalink Reply
ronyDdeveloper
Hello
I've already tried that but it doesn't work. It returns nothing.

Rony
sergio11ofpp replied on at Permalink Reply
sergio11ofpp
$page_current = Page::getCurrentPage(); <-Current page u are!
$page = $page_current->getCollectionHandle(); U take the handle
echo $page; <- check
ronyDdeveloper replied on at Permalink Reply
ronyDdeveloper
Well this is not the way how I need this to be done. The process is, I do have a list of page handles. I need to create a loop and get the url and store it into an array.

Rony
sergio11ofpp replied on at Permalink Reply
sergio11ofpp
Cant understand what u want))
sergio11ofpp replied on at Permalink Reply
sergio11ofpp
$c->getCollectionHandle();
<--Try This
ronyDdeveloper replied on at Permalink Best Answer Reply
ronyDdeveloper
This is not what I want. I do have handles. I need page url of those respective handle. And I cannot get it by Page::getCurrentPage(); as the handles stored in a custom DB table.

Rony