You are not logged in Log in Join
You are here: Home » Members » kslee » [Standard] DTML Repository Patch(sort of ...) » DTML Repository Patch: How to Use

Log in
Name

Password

 
 

After installation, create "StDTMLRepo" folder in your acquisition path. "StDTMLRepo" stands for "Standard DTML Document/Method Templates Repository".

Then put there some DTML Documents/Methods which you want to use as templates. DTML Document there will be a template for DTML Document and DTML Method there a template for DTML Method. Set their title so that you can see what they are for. Example:

ID             Title
dd4branch1     DTML Document for Branch 1
dm2b_called    DTML Method without header/footer
dm_index_html  index_html DTML Method
dd_index_html  index_html DTML Document
dd_cus_header  DTML Document with non standard header
...            ...

If you do not put any DTML Document/Method there, you will see "Defualt DTML Document" or "Default DTML Method" in the "Available Templates" selection box which appears below the usual "File" input field on the Add Document/Method screen. They mean the hard-coded default_dd_html/default_dm_html.

With "NoStDTMLTemp" porperty of a folder, you can turn off/on the "Available Templates" selection box. If a folder(or one of its parent folders) has non-false "NoStDTMLTemp" property, "Available Templates" selection box does not appear. If that property is set to false(i.e. empty string property or zero integer property), "Available Templates" selection box appears again. The follwings are examples:

  • If you create "StDTMLRepo" folder at the root(/) folder, you will see the "Available Templates" selection box everywhere.

  • If your folder tree is as the below,

    rootfolder/branch1/sub1
              /branch2/sub2
    

    and rootfolder & branch2 have "StDTMLRepo" respectively, rootfolder, branch1 and sub1 will get the "Available Templates" listing from rootfolder's "StDTMLRepo" while branch2 and sub2 will get from branch2's "StDTMLRepo".

  • If your folder tree is as the below,

    folder/branch1/sub1
          /branch2/sub2
    

    and only "folder" has "StDTMLRepo", but branch1 has non-false "NoStDTMLTemp" property and sub1 has false "NoStDTMLTemp". Then only branch1 do not have "Available Templates" selection box while all others including "folder" have the "Available Templates" selection box.

What if you both select "Local File" and "Available Templates"?
Selection from "Available Templates" will be used to creat the new DTML Document/Method, unless the selection from "Available Templates" is set to "Default DTML Document/Method". Actually setting to "Default DTML Document/Method" is setting "StDTMLTemp" to be false, which, in turn, instructs the "addDTMLDocument/Method" method in the DTMLDocument/Method.py module to behave asif unpatched.