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).
Solved! Go to Solution.
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?
Power Pages Super User | MVP
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
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..,
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?
Power Pages Super User | MVP
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!