Using scroll viewport template as HTML export template

Comments

5 comments

  • Avatar
    Thomas Rough (K15t)

    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)

    -1
    Comment actions Permalink
  • Avatar
    Eric

    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

    4
    Comment actions Permalink
  • Avatar
    Philipp Michalzik

    Hi Eric,

    thank you very much for the detailed informations, I will have a look at the exporter in the next days and will try to use your code snippets. Great job, I am always thankful for people like you who share their knowledge with the community!

    Kind regards,
    Philipp

    0
    Comment actions Permalink
  • Avatar
    Philipp Michalzik

    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

    1
    Comment actions Permalink
  • Avatar
    Thomas Rough (K15t)

    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)

    -1
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk