Loading...
 

SmartyTplEditingDev

Problem 


Smarty template files are hard to edit. Editing the source by hand is a pain. WYSIWYG editors sometimes do not render/parse the templates properly. Even when there are no problems, the Smarty logic and variables make things quite confusing.

More on the problem - a user's perspective:

  • Loss of modifications on upgrade To modify Tikiwiki for real-world applications, extensive template modifications are needed. But they're overwritten when you upgrade to a new version.
  • Styles and templates Some styles assert their own templates, which take precedence over the default templates. However, the style-asserted templates are not available for editing in Edit Templates; therefore, some modifications in Edit Templates appear to have no effect (which is confusing).

Possible solutions? 


How can we make editing Smarty templates in WYSIWYG editors more like editing normal XHTML files? These are some ideas I had. They may or may not make things easier. Please give feedback.

Changing Smarty tpl delimiter tag syntax (for wysiwyg editors)

  • Some believe that using <{ }> as opposed to { } as delimiters make WYSIWYG editors play nice
  • In theory, <!{ }> as delimiters would hide all Smarty tags
  • We may not want to hide Smarty variables; we can use <{ }> for variables and <!{ }> for logic
  • Renaming templates to .tpl.html would allow WYSIWYG editors to open them easily.
  • Use code highlighting schemas for various editors, ex. Dreamweaver



Page last modified on Sunday 11 April 2004 09:06:02 GMT-0000

Why Register?

Register at tiki.org and you'll be able to use the account at any *.tiki.org site, thanks to the InterTiki feature. A valid email address is required to receive site notifications and occasional newsletters. You can opt out of these items at any time.