Explorer Client starter

Contents

Inital Setup

Create project

enonic project create -r starter-explorer-client

Naming

Your new project should have a good name. Here are some places where you should update the code to reflect what you prefer:

gradle.properties
projectName=starter
appName=com.enonic.app.explorer.client.starter
rootProjectName=app-explorer-client-starter
build.gradle
app {
  displayName = 'Change me in build.gradle'
  vendorName = 'Enonic AS'
  vendorUrl = 'http://enonic.com'
}
src/main/resources/application.xml
<application>
    <description>Change me in src/main/resources/application.xml</description>
</application>

Exposing search data

The starter contains some examples on how to expose search data. A single Explorer client app can provide multiple ways to expose search data. You should remove the ones you don’t want, change or even add the one(s) you want. Common to all the examples is that they are using the Search API.

Server Pages (html)

There is a simple example in src/main/resources/site/pages/searchPage on how to implement a server page that exposes search data. Notice that the example fetches two configuration variables: queryParamName and interfaceName. It does that in a "smart" way, by first looking at the page config, then falling back to content type, x-data and finally site config.

Service (JSON API)

There is a simple example in src/main/resources/services/searchDefaultInterface on how to expose all the data provided by the search API as a JSON.


Contents

Contents