This is not the full blown "content templates" that Alex has planned, but it satisfies my needs and I hope you enjoy it.
Basically, we use Etomite as a CMS for websites where a non-technical person could be managing the content documents. We have found that the [*title*], [*description*], and [*content*] was just too limiting for what we needed. We wanted the ability to add extra "fields" that the CMS manager could associate with each document. Although this can be accomplished with snippets, it was not very elegant or user friendly as we wanted for our non-technical customers.
I have borrowed heavily from Alex's code, as well as some code from another open source CMS, and a lot of my own code, to prepare this contribution. Once installed, it will allow you to create the variables that you want associated with the documents. At this time, it is limited to only a "global" list of variables, so it is not as flexible as a "content template" that might be created and applied to the documents (so that the extra variables are different depending on which type of content template you have applied). But for now, this seems to be good enough to hold us over.
The variables (aka fields) that you can add to the documents include:
- radio selection
- checkbox
- select dropdown
- select box (including support for multiple options)
- text (simple one line field)
- textarea (plain text textarea)
- htmlarea (htmlarea applied to the textarea - assuming you have htmlarea enabled)
- file (including file upload, preview, delete, and "clear" functions)
- date (which uses the same calendar as the publish/unpublish feature
- text with specific requirements: URL, Price, Email
I have written the code to embed this in the IE dropdown menu layout so it is included with the resources menu. It is also located in the "Manage Resouces" page if you are using the other layout option.
After you have it installed, you can call the extra document variables, just like you would use the other content variables in your template, snippet, chunk. [*my_extra_variable*]
This was written based on the 0.6 (edit) FINAL release and I have provided my modified files if you just want to diff with your install.
I've done quite a bit of testing and debugging, but let me know if you find problems with it. web_at_apodigm.com
****EDIT****
I'm posting a new version of DocVars (aka Document Content Variables) here soon. It includes a roll up of all the changes that have been posted in this forum up to this point. It is also compatible with the final release of Etomite 0.6. It will be posted soon.
This also includes contributions from stebrennan:
Variables associated with the templates
(so that "content variables" are associated with each display template... creating something more like content templates)
Also, includes minor bugs and fixes to some of the items found in this forum...
************
Attached File(s)
-
docvars06.zip (63.98K)
Number of downloads: 686
This post has been edited by apodigm: 07 October 2004 - 05:54 AM

Sign In
Register
Help
This topic is locked
MultiQuote