Personal tools
You are here: Home catalog Products.FileTemplate
Log in


Forgot your password?
 

Products.FileTemplate

Pre-filled file templates

Current release
Products.FileTemplate 1.1.2

Released May 25, 2010

Download file Get Products.FileTemplate for All platforms (17.3 kB)
Products.FileTemplate-1.1.2.tar.gz
Download file Get Products.FileTemplate for All platforms (38.6 kB)
Products.FileTemplate-1.1.2-py2.6.egg

Project Description

File Template

The basic idea is that this product provides a Type Information subclassing from Factory-based Type Information which on creation uploads a Template file sitting on the server to the newly-created object.

The basics - ZMI

  • Go to portal_types tool
  • Choose Template-based Factory Information
  • Set a id (eg: "Vacation")
  • Choose a base type (eg: "CMFDefault: Portal File")

Done. You created a new object type. Now for the template.

  • Go to the portal_file_templates tool
  • Create a File, use the same id as you used above (eg: "Vacation")
  • Upload the template content to this file

Now anytime you create a new object of this type it will come pre-filled with the contents of the template file.

Gotchas

  • The type you choose as base must support WebDAV PUT for the file you set as template.
  • The content type of the template file is passed through PUT to the content. That should be enough to satisfy Archetypes. There's no way to control the filename passed to PUT for now.

trunk (2010-05-25)

  • xxx [Sidnei da Silva]

1.1.2 (2010-05-25)

  • SYSTEMSINTERNAL-424 Removed Tabindex [john]
  • added Trove classifiers
  • SYSTEMSINTERNAL-370, SYSTEMSINTERNAL-371, SYSTEMSINTERNAL-372, SYSTEMSINTERNAL-373: prepared product for being open sourced [Raj Shah]
« May 2012 »
May
MonTueWedThuFriSatSun
123456
78910111213
14151617181920
21222324252627
28293031