DEPRECATION WARNING

This documentation is not using the current rendering mechanism and is probably outdated. The extension maintainer should switch to the new system. Details on how to use the rendering mechanism can be found here.

Customizing the DOCX-Page via TyposcriptΒΆ

The DOCX is rendered based on a very simple template. You can easily update the doc_creator page object to contain additional information or content elements on every DOCX page.Some parameters can be set via the Constant Editor (see next chapter).

:underline:`You don't have to put any of the following lines into your template, they are already there. They are noted here just for reference purposes.`

doc_creator = PAGE
doc_creator {
  50 = CONTENT
  50 < styles.content.get
  typeNum = {$extension.doc_creator.typeNum}
  config.pageGenScript = EXT:doc_creator/gen_doc.php
  config.admPanel = 0
  config.xhtml_cleaning = 0
  config.USERNAME_substToken =
  config.ftu = 0
  config.disableCharsetHeader = 1
  config.prefixLocalAnchors = 0
}

Example to modify docx content from template setup:

temp.title = COA
temp.title {
 10 = TEXT
 10 {
   data = field:title
   if.isFalse.field = nav_hide
   wrap = <h1>|</h1>
 }
 20 = TEXT
 20 {
   value = &nbsp;
   if.isTrue.field = nav_hide
   wrap = <h1>|</h1>
 }
}

doc_creator {
 10 = TEMPLATE
 10.template = FILE
 10.template.file = EXT:doc_creator/res/html2doc.html
 10.marks.TITLE < temp.title
 50.stdWrap.wrap = <div id="maincol"> | </div>
}