cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AdamKomisarek
Regular Visitor

Custom site markers in Liquid

Hello! 

 

Is there anything special, which needs to happen in order to use custom sitemarkers in the Liquid code?

 

I have following liquid code:

 

 

{% assign mysite = sitemarkers['Patient'] %}
                
<a href="{{mysite.url}}?id={{ attr.id}}">{{ sitemarkers['Patient'].url }}{{ attr.name }}</a>

 

Where Patient is my custom sitemarker, and the above returns empty string. However when I change the sitemark to preexisting one (like Search/Home) it works and the URL is provided for me. 

 

Screenshot of the Patient Site Marker and all site markers attached. 

 

EDIT: Strangely enough I couldn't find anything in the Internet / documentation so I guess not, but then why the above doesn't work? As you can see I tried assign and accessing directly the sitemarkers object, and it still doesn't work. Tried ["Patient"] (as in some examples) and [Patient] (as in the MS docs, and this actually fails altogether). 

 

1 ACCEPTED SOLUTION

Accepted Solutions
OliverRodrigues
Super User
Super User

hi @AdamKomisarek 

the same code works for me no issues, can you check if you Web Page associated with your Site Marker is the "Root" Web Page?




If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Power Pages Super User | MVP


Oliver Rodrigues


 

View solution in original post

4 REPLIES 4
timl
Super User
Super User

Hi @AdamKomisarek 

Just to rule out one of the more obvious answers, have you tried clearing the cache?

https://docs.microsoft.com/en-us/powerapps/maker/portals/admin/-server-side-cache

 

AdamKomisarek
Regular Visitor

hi @timl thanks for your suggestion.

 

Actually, I didn't - everything else seems to be pulled instantly (or after syncing config in the Portal Studio).

Nevertheless, I cleared the cache and the config. 

 

Alas, it didn't help 😞 can't figure it out why...

 

I can query my entities, used new entity list, all of that basic stuff, but sitemarkers fail for me..,  

OliverRodrigues
Super User
Super User

hi @AdamKomisarek 

the same code works for me no issues, can you check if you Web Page associated with your Site Marker is the "Root" Web Page?




If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Power Pages Super User | MVP


Oliver Rodrigues


 

Thanks @OliverRodrigues, it was not actually part of the root, as I had some kind of hierarchy - View Patients -> View Patient, and wanted to manually link the patients into View Patient view. Moving it under the "Home" page fixed the issue...

 

Is it known limitation? It's not stated in the documentation https://docs.microsoft.com/en-us/powerapps/maker/portals/liquid/liquid-objects#sitemarkers that it works only for single level nesting.

 

My next question is then, I guess, how I can build dynamically URL if I use custom hierarchy?

 

This limitation got me of the guard, thanks a lot for your suggestion! 

Helpful resources

Announcements
Carousel Community Blog

Check out the Community Blog

Read all about the most recent blogs in the community!

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Carousel News & Announcements

What's New in the Community?

Check out the latest News & Events in the community!

Users online (3,191)