Using iframe for extending frontend UI

This sample gives some clues about how to use iframe in frontend UI. This sample use ExtraTab feature with an iframe that contains references to OpenKM object as links.

The HTML file has a valid OpenKM UUID's links.

The sample below use Exposed frontend JavaScript API .

File extra_tab.html:

<script type="text/javascript">
  function openPath(path) { 
  <a href="javascript:void();" onclick="openPath('9789ac11-ac03-4ce7-87e9-9643b0ddf99a');">Document link example 1</a>

Copy the extra_tab.html file into  $TOMCAT/webapps/OpenKM folder.

Copy to OpenKM folder is mandatory, otherside from iframe will not be able to access protected resource.

When you change the contents of the OpenKM.war file is deployed a new version of the application and all the contents into $TOMCAT_HOME/webapps/OpenKM will be refreshed and you will lost any change you made directly in the webapps/OpenKM folder.

Finally configure ExtraTab feature with the new url, for example  http://localhost:8080/OpenKM/extra_tab.html.

Consider http://localhost:8080/OpenKM/extra_tab.html as an example. You should use your own public OpenKM application url.