How Can we embed external HTML files in Nuxeo Platform
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2017 05:57 AM
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,
However, I found that in the document creation layout there is an existing widget called template
and 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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2017 10:33 AM
This was also asked on StackOverflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2017 06:43 AM
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.
