Thank you very much! Awesome! @yariplus
Using exposed API in templates.
-
More of a theme help, but I couldn't find anything for that.
On the route
api/user/airee
I can see that the SSO stuff for steam (steamid, URL, etc...) is exposed via the API:
"sso":[{"associated":true,"url":"https://steamcommunity.com/profiles/76561198099320574","steamid":"76561198099320574","name":"Steam","icon":"fa-steam"}]
Is there any way for me to use this in the profile template? I want to display the steamid with a link on the profile of every person.
-
If it is already exposed in the profile page /api you can use it in the profile.tpl file.
<!-- BEGIN sso --> {sso.name} -> {sso.url} <!-- END sso -->
-
EDIT: god damnit, i didn't know I had to add the BEGIN and END around it. thanks!
-
@Fiiily You need the
BEGIN/END
becausesso
is an array, if it wasn't you could just do{sso.url}
-
@baris understood, thanks
-
BTW there's a new syntax:
{{{ each sso }}} {./name} -> {./url} {{{ end }}}