{"componentChunkName":"component---smooth-doc-smooth-doc-src-templates-doc-js","path":"/docs/report-templates/detailed-template-example/","result":{"data":{"mdx":{"fields":{"pageType":"doc","title":"Detailed Template Example","editLink":""},"body":"var _excluded = [\"components\"];\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nfunction _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }\nfunction _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }\n/* @jsxRuntime classic */\n/* @jsx mdx */\n\nvar _frontmatter = {\n  \"title\": \"Detailed Template Example\",\n  \"description\": \"detailed template example\",\n  \"section\": \"Report Templates\",\n  \"order\": 37\n};\nvar layoutProps = {\n  _frontmatter: _frontmatter\n};\nvar MDXLayout = \"wrapper\";\nreturn function MDXContent(_ref) {\n  var components = _ref.components,\n    props = _objectWithoutProperties(_ref, _excluded);\n  return mdx(MDXLayout, _extends({}, layoutProps, props, {\n    components: components,\n    mdxType: \"MDXLayout\"\n  }), mdx(\"h1\", {\n    \"id\": \"detailed-template-example\"\n  }, mdx(\"a\", {\n    parentName: \"h1\",\n    \"href\": \"#detailed-template-example\",\n    \"aria-label\": \"detailed template example permalink\",\n    \"className\": \"anchor\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Detailed Template Example\"), mdx(\"br\", null), mdx(\"p\", null, \"The following is a larger report template example that illustrates various features including:\"), mdx(\"table\", null, mdx(\"thead\", {\n    parentName: \"table\"\n  }, mdx(\"tr\", {\n    parentName: \"thead\"\n  }, mdx(\"th\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Feature Example\"), mdx(\"th\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Syntax\"))), mdx(\"tbody\", {\n    parentName: \"table\"\n  }, mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Displaying variables\"), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"inlineCode\", {\n    parentName: \"td\"\n  }, \"{{ folder.name }}\"))), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Using filters\"), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"code\", null, \"{{ at.filesize \", \"|\", \" filesizeformat }}\"))), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Looping over lists of data\"), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"inlineCode\", {\n    parentName: \"td\"\n  }, \"{% for im in folder.images %}\"))), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Checking conditions\"), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"inlineCode\", {\n    parentName: \"td\"\n  }, \"{% if report_signed_by %}\"))), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Accessing static data\"), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"inlineCode\", {\n    parentName: \"td\"\n  }, \"{% for item in static_data['foo'] %}\"))), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Accessing the list of images in the folder\"), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"inlineCode\", {\n    parentName: \"td\"\n  }, \"{% for im in folder.images %}\"))), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Accessing the list of snapshots for a given image\"), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"inlineCode\", {\n    parentName: \"td\"\n  }, \"{% for snapshot in im.snapshots %}\"))), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Accessing snapshots in a container\"), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"inlineCode\", {\n    parentName: \"td\"\n  }, \"{% for snapshot in snapshots['container1'] %}\"))), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Displaying image thumbnails\"), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"inlineCode\", {\n    parentName: \"td\"\n  }, \"<img src=\\\"{{ im.get_thumbnail(bounds=[200,200]) }}\\\" />\"))), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Displaying image regions\"), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"inlineCode\", {\n    parentName: \"td\"\n  }, \"<img src=\\\"{{ snapshot.get_region(bounds=[300,300]) }}\\\" />\"))), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Displaying slide labels\"), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"inlineCode\", {\n    parentName: \"td\"\n  }, \"<img src=\\\"{{ im.get_label(bounds=[200,200]) }}\\\" />\"))))), mdx(\"pre\", null, mdx(\"code\", {\n    parentName: \"pre\"\n  }, \"{% block title %}\\n  {# Set the title of your PDF document in this block (text only) #}\\n  PDF Report Title\\n{% endblock %}\\n{% block body %}\\n<div class=\\\"container\\\">\\n  {#\\n    Add any text such as a report title or description of the report anywhere in the\\n    report template using different HTML blocks such as paragraph tags <p>,\\n    line breaks <br>, headings <h1> / <h2> / etc.\\n  #}\\n\\n  <h1>Detailed Report</h1>\\n\\n  <p>\\n    Use variables passed to the template like this: The name of the case is {{ case.name }}.\\n  </p>\\n\\n  <h2>Folder Name</h2>\\n  {# Displays the currently selected folder's name #}\\n  {{ folder.name }}\\n\\n  <h2>Folder ID</h2>\\n  {# Displays the currently selected folder's ID in PathcoreFlow #}\\n  {{ folder.id }}\\n\\n  <h2>Folder Description</h2>\\n  {# Displays the currently selected folder's description #}\\n  {{ folder.description }}\\n\\n  <h2>Custom Fields</h2>\\n  {# Displays all the Custom Fields associated with the folder #}\\n  {{ folder.fields }}\\n\\n  <h2>Static Data</h2>\\n  <ul>\\n  {# Begins looping through the static data array called 'foo' #}\\n  {% for item in static_data['foo'] %}\\n      {# Outputs each item in the 'foo' array #}\\n      <li>{{ item }}</li>\\n  {% endfor %}\\n  </ul>\\n  {# Outputs string variables 'name' and 'date' from static_data #}\\n  <p>\\n      Name: {{ static_data['name'] }}  <br>\\n      Date: {{ static_data['date'] }}\\n  </p>\\n\\n  <h2>Images</h2>\\n  {# Begins looping through all the images in the currently selected folder #}\\n  {% for im in folder.images %}\\n    {# Outputs the properties of each image #}\\n    {# Outputs the image name, ID, filesize #}\\n    <h3> {{ im.name|e }} (ID: {{ im.id }}) ({{ im.filesize | filesizeformat }}) </h3>\\n    {# Displays the actual image as a thumbnail #}\\n    <img src=\\\"{{ im.get_thumbnail(bounds=[200,200]) }}\\\" />\\n    {# Displays a portion of the full size image #}\\n    <img src=\\\"{{ im.get_region(area=[0, 0, 10000, 10000], bounds=[200,200]) }}\\\" />\\n    {# Displays the slide label of the image (if available) #}\\n    <img src=\\\"{{ im.get_label(bounds=[200,200]) }}\\\" />\\n    <h4>Snapshots</h4>\\n    {# Snapshots and snapshot metadata for each image can also be displayed #}\\n    {% for snapshot in im.snapshots %}\\n      {# Displays the title, id and description of each snapshot #}\\n      <div>\\n        <p>Title: {{ snapshot.title }}</p>\\n        <p>ID: {{ snapshot.id }}</p>\\n        <p>Description: {{ snapshot.description }}</p>\\n        {# Displays the snapshot #}\\n        <img src=\\\"{{ snapshot.get_region(bounds=[150,150]) }}\\\" />\\n      </div>\\n    {% else %}\\n      <p>No snapshots!</p>\\n    {% endfor %}\\n  {% endfor %}\\n\\n  <h2>Attachments</h2>\\n  <ul>\\n  {# Begins looping through all the attachments in the currently selected folder #}\\n  {% for at in folder.attachments %}\\n    <li>\\n      {# Outputs the attachment name and filesize #}\\n      {{ at.name }} ({{ at.filesize | filesizeformat }})\\n      {# Outputs the attachment URL #}\\n      <a href=\\\" {{ at.file_url }}\\\"> {{ at.file_url }} </a>\\n    </li>\\n  {% endfor %}\\n  </ul>\\n\\n  <h2>Snapshots</h2>\\n  {# Snapshots can also be displayed without accessing their associated image #}\\n  {# Begins looping through all the snapshots in the snapshot container 'container1' #}\\n  {% for snapshot in snapshots['container1'] %}\\n    {# Displays the title, id and description of each snapshot #}\\n    <div>\\n      <p>Title: {{ snapshot.title }}</p>\\n      <p>ID: {{ snapshot.id }}</p>\\n      <p>Description: {{ snapshot.description }}</p>\\n      {# Displays the snapshot #}\\n      <img src=\\\"{{ snapshot.get_region(bounds=[300,300]) }}\\\" />\\n    </div>\\n  {% endfor %}\\n\\n  <p>If the report is signed, the signer's signature and name will appear here:</p>\\n  {% if report_signed_by %}\\n    <div class=\\\"signature\\\">\\n      <img src=\\\"{{ report_signed_by.signature }}\\\" />\\n      <p>Signed by {{ report_signed_by.name }} at {{ report_signed_at }}</p>\\n    </div>\\n  {% endif %}\\n</div>\\n{% endblock %}\\n\")));\n}\n;\nMDXContent.isMDXComponent = true;","tableOfContents":{"items":[{"url":"#detailed-template-example","title":"Detailed Template Example"}]}}},"pageContext":{"id":"d75ac144-823a-58c2-b7da-ba2989a692f8"}},"staticQueryHashes":["1086510573","1106176283","1122327541","2140385554","2719290676","3597609067","4027383558"]}