Login

The pageContent() method inserts content into the page. Use the methods below to determine where on the page the content is inserted.
ItemSample CodeOutput
HEADER_BOTTOMB.net.pageContent('HEADER_BOTTOM').HEADER_BOTTOM().addContent('').insert()
Note: View page source and search for <!-- HEADER_BOTTOM --> to view where the code was inserted on this page.
true
HEADER_CSS_BOTTOMB.net.pageContent('HEADER_CSS_BOTTOM').HEADER_CSS_BOTTOM().addContent('').insert()
Note: View page source and search for <!-- HEADER_CSS_BOTTOM --> to view where the code was inserted on this page.
true
HEADER_CSS_TOPB.net.pageContent('HEADER_CSS_TOP').HEADER_CSS_TOP().addContent('').insert()
Note: View page source and search for <!-- HEADER_CSS_TOP --> to view where the code was inserted on this page.
true
HEADER_NORMALB.net.pageContent('HEADER_NORMAL').HEADER_NORMAL().addContent('').insert()
Note: View page source and search for <!-- HEADER_NORMAL --> to view where the code was inserted on this page.
true
HEADER_SCRIPTS_BOTTOMB.net.pageContent('HEADER_SCRIPTS_BOTTOM').HEADER_SCRIPTS_BOTTOM().addContent('').insert()
Note: View page source and search for <!-- HEADER_SCRIPTS_BOTTOM --> to view where the code was inserted on this page.
true
HEADER_SCRIPTS_TOPB.net.pageContent('HEADER_SCRIPTS_TOP').HEADER_SCRIPTS_TOP().addContent('').insert()
Note: View page source and search for <!-- HEADER_SCRIPTS_TOP --> to view where the code was inserted on this page.
true
HEADER_TOPB.net.pageContent('HEADER_TOP').HEADER_TOP().addContent('').insert()
Note: View page source and search for <!-- HEADER_TOP --> to view where the code was inserted on this page.
true
PAGE_ENDB.net.pageContent('PAGE_END').PAGE_END().addContent('').insert()
Note: View page source and search for <!-- PAGE_END --> to view where the code was inserted on this page.
true
A common use of pageContent() is to make variables that have been generated in "app.ts" by a merge report available to the static scripts in the merge report by placing them in the header on the page. An example is shown below. Unlike the methods shown above, the example below does not run on this page.
const vars = `
  <script>
    const someVariable = "Content generated by merge report";
  </script>
  `;

B.net.pageContent('vars').HEADER_SCRIPTS_BOTTOM().addContent(vars).insert();