Skip to main content

Build a widget to display file attachments (TCS)

Written by Miller Saltzman
Documentation Editor, Customer Success at MindTouch
This page applies to:MindTouch 4 and MindTouch TCS


Want to allow non-pro members to see the attachments you have added on some of your pages? By adding this dekiscript, customers can see a display of the attachments similar to the one pro members see. You can choose which pages you want to have this feature.

Why should I use it?

  • If there are images or other documents that you would like to give non-pro-member coworkers access to.
  • If there are images or other documents that you would like to give customers access to.
  • It is a great way to display a list of documents in your documentation.
  • Customer support agents can create a central location for customers to download patches to fix their software.

Creating Your Template

To create a template that will show all this information:

  1. Go to Site Tools Templates > Template:Custom > Views > New Page.

Image 2.png

   2.  Choose a title for your template. You will be using this title later.

   3.  Paste the following DekiScript and CSS below using the correct styles for each. Then click save.

DekiScript (red box):

if (#page.files)
<div id="resources-section-attachment-links">
      <th>"Last Modified"</th>
      <th>"Added By"</th>
      foreach (var file in page.files)
          <td class="file-name sorting_1">
              <a target="_blank" href=(file.uri)></a>
              date.format(,"MMMM dd, yyyy");

CSS (blue box):

table, td, th {
  border: 1px solid black;

Adding Your Template to Documentation

To make your template show up on your site:

  1. Paste the following at the beginning of your documentation in a DekiScript style (red box):

    2.  Replace "Template_Title" with the title you chose for the template in step 2 of "Creating Your Template." Make sure to use an underscore (_) instead of a space.

If you need help creating templates click here for how to make templates in TCS and here for how to use templates in MindTouch 4.  


The following file extensions are not supported as attachments because of security restrictions: 

  • HTML
  • HTM
  • EXE
  • VBS
  • SCR
  • REG
  • BAT
  • COM

Files not included on this list can be successfully attached within MindTouch pages. For more information on attaching files click here.  Maximum of 100 files recommended. 

What It Looks Like on Your MindTouch Site?

Note: This table might look different on your page. MindTouch used CSS to create this table.

  • Was this article helpful?