Hello,
I have a chart in Labkey that I want to make accessible from a URL without any additional Labkey user interface surrounding it. The URL will eventually be used to display the chart on a sign using an external application. To be more clear, I want to get a page without the header containing the site logo, project navigation, search bar, menus, and tabs.
I tried exporting the chart to javascript, creating a module with a resource/web/ directory and placing the script in an html file in this directory. The resulting file gets served, but I am having a hard time getting the required dependencies to load. Is there any easier way to do this?
Thanks,
-Will |
|
Ben Bimber responded: |
2017-02-07 17:51 |
Hi Will,
If you want LK to render your page, I think you can put your JS snip on a simple HTML page, and then add a .view.xml file with something like:
<view xmlns=" http://labkey.org/data/xml/view" template="print">
<dependencies>
<dependency path="/myModule/foo.js"/>
</dependencies>
</view>
I didnt check this, but I think either template="print" or template="none" should give you no borders.
A quick and dirty way to accomplish this is probably also to append _hideFrame=1 to your URL (without needing the view.xml); however, I'd personally probably do the former.
-Ben |
|
cnathe responded: |
2017-02-08 06:15 |
Good suggestion, Ben. I did a quick test and I was able to take the chart export script from a box plot and put it into a test.html file in a module. Then I created a test.view.xml file next to that HTML file and put the following content in it and everything worked as expected (i.e. dependencies for the chart loaded and the plot displayed):
<view xmlns=" http://labkey.org/data/xml/view" template="print" frame="none">
</view> |
|
Will Holtz responded: |
2017-02-09 10:27 |
Hi Ben & Chris,
Thanks for the help. Chris' method gets me exactly what I need.
-Will |
|
|
|