https://www.youtube.com/watch?v=0LW3w55QuD0 ⬇️ One...
# news
w

https://www.youtube.com/watch?v=0LW3w55QuD0

⬇️ One for you @User & @User to avoid using hardcoded API URLs in your packages
n
Just for v9
w
Yep exactly Nik - just a hidden gem that I am not sure everyone is aware of. So just bring awarness to it And after seeing you & Paul use hardcoded URLs to controllers, I wanted to make sure you both was aware of the approach to make sure you package is more bullet proof
n
yeah, its brilliant. so useful!
c
I wanted to reference the Umbraco path in my examine package in the Js controller. How do I do that? It didn’t seem to like Umbraco.Sys.ServerVariables.whatever
n
what issue do you get?
w
Yeh not sure I follow you @User ? What are you trying to do?
c
I just wanted to set a variable which had the umbraco path in case anyone changed it in their application. It’s in the server variables. When I tried to use the property on the JavaScript server variables it said it didn’t recognise the object Umbraco.Sys.ServerVariables so I can’t access it.
w
Only available in the backoffice when logged in. You trying to use it frontend of project or…?!
c
No it was for the link the the full examine dashboard from my content app
w
Do you get any of the Umbraco.Sys stuff in the browser console dev tools?
c
Yeah I get it in the browser no probs
w
Would need to do a lunchtime debug session to see what’s up