Using scroll viewport template as HTML export template
Hello there,
we are using Scroll Viewport for presenting our documentation online. Now we want to export the content with Scroll HTML exporter for offline use. Is there a workflow to use the template we use for the viewport as a template for the HTML export?
Greetings
Philipp Michalzik
-
Hi Philipp,
Thanks for your question.
Unfortunately, it is not possible to use your Scroll Viewport template(s) in conjunction with exports using Scroll HTML Exporter.
Were you currently using a specifically customised Viewport theme? Or were you using one of the included default themes?
If you are using the default WebHelp theme for Scroll Viewport, you will be able to match your HTML exports using the Scroll WebHelp template which is included with Scroll HTML Exporter. Would this be a possibility?
For Viewport themes which have been specifically customized, it would require making specific changes to the template for Scroll HTML Exporter. This will then allow you to export your content with the necessary styling preferences. If this is the case, please see our documentation which outlines the steps for creating a template: https://help.k15t.com/scroll-html-exporter/creating-a-template-75367699.html
I hope this information helps. Please let me know if you have any further questions.
Kind regards, Thomas (K15t Software)
-
Philip, I was in the same boat when I first started with the HTML Exporter. I reused my Viewport theme's files for the Exporter and made the required tweaks necessary, by comparing with the K15t's Scroll WebHelp template.
Here are some notes I took in the process of converting to HTML exporter view.
- When pointing to other .vm files use #parse("filename.vm") instead of $include.template("filename.vm").
- Use $stringEscapeUtils.escapeHtml() around placeholders
- Use $element instead of $page
- Use $pageHierarchyHelper.getBreadcrumbs($element.PageId) instead of $page.ancestors
- Use $context.getLinkNamingStrategy().generateLinkString($element) instead of $page.link
- page.vm - Includes if ($renderStart) statement at beginning. Page content is automatically added right before the else statement.
- include-sidepanel.vm - Builds page tree. A lot of edits here to make look the same as the Viewport view.
- scroll-tree.js - Jquery code for page tree. A lot of edits here to make look the same as the Viewport view.
Hope this helps,
Eric
-
Hello,
right now I am trying to reuse the styling of my Viewport template for the HTML export. The scss styling works fine and I also implemented some custimized html elements to the site but I am stuck while implementing the actual content of the page.
Where in the template files is the content implemented? And what is the correct placeholder for rendering the content? Everytime I do an export, the content is placed in a div-tag under my customized content.
Greetings
Philipp
-
Hi Philipp,
Thanks for your response.
You would need to use the $page.content placeholder to render the content.
It is possible to see how it's done in the webhelp theme here: https://bitbucket.org/K15t/scroll-webhelp-theme/src/28bb9c1221389b35703a2a903b9607d9ac35f07c/src/main/resources/com/k15t/scroll/scroll-webhelp-theme/scroll-viewport/include/include-content.vm?at=master&fileviewer=file-view-default#include-content.vm-9:10,15:16
I hope this information helps. If you experience any issues please do not hesitate to contact us via support@k15t.com.
Thanks, Thomas (K15t Software)
Please sign in to leave a comment.
Comments
5 comments