Hello,
As far as I could search online, I couldn’t encounter any reference documentation which I can use for portal template customizations.
What I think I know is the following;
- Go’s
html/template
package is used in the templates (the ones that reside at /opt/tyk-dashboard/portal/templates that comes with on-premise installation) - There are some functions available, like “markDown”, “b64”
- There is some data exposed to portal templates as well. I believe some of it but not all is listed on https://tyk.io/docs/tyk-developer-portal/customise/.
Besides what’s listed above, I am also aware of the content that resides on https://tyk.io/docs/tyk-developer-portal/customise/.
What I’m seeking;
- A reference list of functions that’s available on templates
- Reference documentation of the data that’s exposed to templates. I am especially looking for this as I experienced there are changes from pages to pages. For example, while a page that’s created on the dashboard has a “slug” property, a page such as the ones that reside on paths like /apis, /apis/:api_id/documentation/ do not have such property even though they have it hardcoded.
- Which Go package is exactly used for templates? I am questioning this as I think its documentation may be beneficial if it’s open source.
Additional info;
I am using the following to see what’s exposed to the template;
{{ range $key, $item := .}}
{{ $key }} - {{ $item }}
<hr>
{{ end }}
If there is a better way to inspect the data, I’d like to hear you out as this one does not help much with the nested data.
Thanks,
Ali