Add the ability to specify a default value for a content block and more...
Posted: Sat Jul 28, 2007 6:15 pm
Using the "block" parameter to the "content" Smarty tag makes it possible to create templates that result in a relatively easy-to-use data entry form when editing associated pages. However, there are a few enhancements that would make this feature more useful:
- Enable the user to specify a default value for a given content block.
- Omit the editor for the default content block if the template does not include any "content" Smarty tags that do not have a "block" parameter.
- List the text entry fields or text areas in the order in which they occur in the template. While this already happens by and large, the "default" content block (i.e. the one without an explicit "block" parameter) is always listed first. This breaks up the logical order of the page as given in the template and may be a real usage problem since the default content block is a text area that may require the user to scroll down to see any other data entry fields. In that case, they will frequently fail to edit the additional fields.
- The last point suggests that an additional parameter may be useful to indicate "required" content blocks.
- It may also be worthwhile to be able to specify type validation for content blocks (e.g. integer, date, time, etc.) However, to be fully useful, it would probably be necessary to enable the template developer to write custom validators and then associate them with content blocks as needed.