Hi all,
I want to start working on an idea I got recently and I would like some opinions.
It’s something like ManagerManager but everything is defined in the template.
Here is my idea of how a template will look:
[Note: another API version bellow]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>[*pagetitle*]</title>
</head>
<body>
[*content*]
</body>
</html>
[#TemplateManager
defaultChildTemplateId=6
content=auto
pageTitle=hide 6|required|rename <b>Title</b><br/>required field|defaultValue My-Title-default-value
#]
Short API explanation:
defaultChildTemplateId 6 - will force that when a child is created will have the template id 6[similar to automaticTpl]
content auto - will display the content textarea only if [*content*] is detected [similar to Hide-Editor]
pageTitle
hide - will hide pagetitle field from all the documents having this template
hide 6 - will hide pagetitle field from all users having role 6
required - this filed is required [Note: a custom javascript check function will be nice. Will be done in previous versions]
rename <b>Title</b>
required field - html tags can be used in renaming the field
defaultValue My-Title-default-value - sets default value
Changes: API calls, required field functionality.
TODO:
- check if templateFromFile plugin can be integrated into this plugin [API to use file file-name.tpl]
Thank You