This topic is locked

Full url with makePageLink

8/4/2023 10:50:20 AM
PHPRunner General questions
Davor Geci authorDevClub member

Hello,
this is surely an easy question.
I'm using makePageLink to store the link in the field of the database. But in some cases I'm sending these links in an email so I need the full url.
$data["view_page_url"] = makePageLink( "employee_documents", "view", $keys );2 questions:
<ol> what is the right way to get the full url (get the server url and concat the makePageLink) would you store the full url in the database or only the page link. I'm not sure because I plan to send pdf reports in emails that could include the links to the records.
</ol>Thanks,
Davor

Davor Geci authorDevClub member 8/4/2023

In the latest webinar about SAAS Sergey used in his code the function projectURL() this is not documented anywhere, at least I can find it. But I think that it does the job.
If I'm wrong, please correct me.
So the answer to my 1. question would be:
$data["view_page_full_url"] = projectURL() . makePageLink( "employee_documents", "view", $keys );

Sergey Kornilov admin 8/4/2023

I have checked with developers and yes, this is the right way to use this function and we will add it to the manual as well.

Davor Geci authorDevClub member 8/4/2023

Thank you.
I will mark as Solved