The Hippo Web Component Plugin allows you to include externally hosted W3C web components in your Hippo CMS implementation.
Add the following dependency to the POM file of the Essentials web application associated with your Hippo project.
<dependency>
<groupId>io.salte</groupId>
<artifactId>hippo-web-component</artifactId>
<version>1.0.0</version>
<type>jar</type>
</dependency>
For more information on creating a project from the Hippo Maven Archetype, including the Essentials web application, visit Getting Started.
- Open a terminal and run "mvn -Pcargo.run -Drepo.path=storage" from the root directory of your Hippo project to launch the project with the Cargo plugin.
- Open your web browser and navigate to http://localhost:8080/essentials.
- Go to the "Library" tab, scroll to the bottom, and click the "Install" button next to the "Web Component" library.
- Stop your Hippo project by returning to the terminal and stopping the application server launched in step 1.
- Run "mvn verify" from the terminal to rebuild the project.
- Run "mvn -Pcargo.run -Drepo.path=storage" from the terminal to relaunch the project.
- Once the application server is up and running and you have seen a number of messages indicating the files have been copied you can stop the server again.
- Run "mvn verify" from the terminal to rebuild the project one more time.
- Run "mvn -Pcargo.run -Drepo.path=storage" from the terminal to relaunch the project.
Your plugin should be installed and available for use within the CMS application's Channel Editor.
The following steps assume that the plugin has been installed and your Hippo project is up in running.
- Open your web browser and navigate to http://localhost:8080/cms.
- Login and click on the "Channels" tab.
- Select the channel you want to work with.
- Click the arrow towards the top left to open up the left sidebar.
- Select the page you want to work with.
- Select the small icon that looks like a cluster of blocks in the upper right corner to display the "Components" palette in the left sidebar.
- Click the "Components" tab on the left sidebar and scroll down until you find the "Web Component" widget.
- Click the "Web Component" widget to select it and then click the location on the page where you want it to appear.
- Once the component is placed, a dialog box will open and prompt you to enter the URL and element name of the element to be inserted into the page.
For example:
- URL: https://myserver/saltelogincomponent.html
- Element Name: salte-login
The Apache 2.0 License
Copyright 2017 Salte https://www.salte.io
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.