Skip to content

Commit

Permalink
feat(plugin): implement getLocalURL
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasmassmann committed Jul 1, 2021
1 parent ff83fc9 commit f83e675
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions templates/plugins/plone.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,10 @@ class PloneAPI extends Hookable {
async getSiteInfo() {
return await this.client.query('@siteinfo')
}

getLocalURL(url) {
return url.replace(this.baseURL, '') || '/';
}
}

export default async function (ctx, inject) {
Expand Down

0 comments on commit f83e675

Please sign in to comment.