Forum Discussion

peterlu's avatar
peterlu
Champion
11 years ago

endpoint path

endpoint url looks like this http://domain.com/hinterlands/plugins/custom/salescontainer/hinterlands/my-custom-endpoint   The endpoint name is "my-custom-endpoint"   Is there any freemarker obje...
  • PaoloT's avatar
    11 years ago

    Hi peterlu,

     

    I don't think there is a context object that exposes this but what I would suggest would be to use a freemarker macro so that you can simply use the macro in your components and you still have only one place where you hardcode (define) the string.

     

    Hope that helps,

  • Parshant's avatar
    Parshant
    7 years ago

    peterlu

    You can use this code to get Endpoint URL's.

    <#assign endpointUrl = webuisupport.urls.endpoints.name.get("my-custom-endpoint").build() />

    ${endpointUrl}