web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

Get base URL of the current Portal page using liquid code

(0) ShareShare
ReportReport
Posted on by 69

Hi

I have a portal site. i tried to get the base url i.e: abc-dev.powerappsportals.com/ 

I am on the index page (refer to image 1). I need to get the base URL using liquid code. i tried with {{ page.url}} , and {{ page.url | base}}.  it only returns "/index" for the example (refer to image 1).  Please advise how i can get the base URL. Thank you, Siva

image 1

pastedimage1668463163522v1.png

I have the same question (0)
  • Verified answer
    AndyArndt Profile Picture
    110 on at
    RE: Get base URL of the current Portal page using liquid code

    I think you might be able to accomplish what you want with the built in Site Marker named Home. The liquid code would look like this:

    {{ sitemarkers[Home].url }}

    Nicholas Hayduk has a video about it on his Engineered Code YouTube channel named "Dynamics 365 Portals Tip #16 - Please Use Site Markers! - Engineered Code"

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
MVP-Daniyal Khaleel Profile Picture

MVP-Daniyal Khaleel 127

#1
MVP-Daniyal Khaleel Profile Picture

MVP-Daniyal Khaleel 127

#3
Tom_Gioielli Profile Picture

Tom_Gioielli 125 Super User 2025 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans