cancel
Showing results for 
Search instead for 
Did you mean: 

How Can we embed external HTML files in Nuxeo Platform

amitgoda
Champ on-the-rise
Champ on-the-rise

Hi All, I want to embed some custom HTML file in my content view. How can we achieve the same ?

Can anyone tell me how can I embed a custom HTML template in my Nuxeo content View. Basically, I want to load an HTML file using IFrame in Nuxeo. Is this possible ?

Edit

I have tried following things so far,

  • Using the following link tried to understand how to create a custom layout and widget but the document just explains on how to create custom layout and widget and not how to confgiure them.
  • Seeing some of the existing examples on Nuxeo forum I see that we can use extension points but again this is very high level and doesn't have thorough explaination on how you configure the templates defined in extension points. I tried creating my custom extension as below
<extension target="org.nuxeo.ecm.platform.forms.layout.WebLayoutManager"
    point="layouts">
    <layout name="req_custom_template">
      <aliases>
        <alias>Custom Template</alias>
      </aliases>
     <columns>
        <column name="last_contributor">
          <widget>req_custom_widget</widget>
        </column>
      </columns>
    </layout>
 </extension>

<extension target="org.nuxeo.ecm.platform.forms.layout.WebLayoutManager"
   point="widgets">
  <widget name="req_custom_widget" type="template">
    <labels>
      <label mode="any"></label>
    </labels>
    <translated>false</translated>
    <fields>
      <field>data</field>
    </fields>
      <properties widgetMode="any">
        <property name="template">/layouts/external_html.xhtml</property>
    </properties>
  </widget>
</extension>

and provided my custom template in NUXEO_HOME/templates/custom/layouts directory and published my content. And In studio, when I see the External Layouts dropdown for Document, I see as below,

enter image description here

However, I found that in the document creation layout there is an existing widget called templateand tried using my XHTML file there and use it. Upon publishing, I see my custom HTML content (which is great).

Still I would like to know what is the correct way of doing this.

2 REPLIES 2

Florent_Guillau
World-Class Innovator
World-Class Innovator

This was also asked on StackOverflow

amitgoda
Champ on-the-rise
Champ on-the-rise

Hi, I understand that I should be using this forum for QA's but as there was no response and I just wanted to check on SO if I could get some light on it. I wanted to have some breakthrough on this as Its been already more than 2 days and there was no comment whether its possible to do that or not. I have asked couple of other questions as well on this forum but I dont see any response on them either.

Getting started

Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.