Smarty-Mode
Manual

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6. Templates

In the Smarty Mode, the Smarty functions (like if, while, for, fopen, fclose) are predefined in functions called "Templates".

Each template can be invoked by the function name or by using the SPACE key after the Smarty function name in the buffer (Note, using M-SPACE disable the template).

A template can be aborted by using the C-g or by lefting empty the tempate prompt (in the minibuffer).


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.1 Customization

`smarty-electric-mode'

Type: boolean
Default value: `t'
Description: If `t'; enable automatic generation of template. If `nil'; template generators can still be invoked through key bindings and menu. Is indicated in the modeline by "/e" after the mode name and can be toggled by `smarty-electric-mode'.

For a complete description of the template customizable variables, see Templates


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.2 Functions


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.2.1 Built-in Functions

`smarty-template-capture'

Menu: Smarty -> Templates -> Build-in Functions -> capture
Keybinding: none
Description:

`smarty-template-config-load'

Menu: Smarty -> Templates -> Build-in Functions -> config_load
Keybinding: none
Description:

`smarty-template-else'

Menu: Smarty -> Templates -> Build-in Functions -> else
Keybinding: none
Description:

`smarty-template-elseif'

Menu: Smarty -> Templates -> Build-in Functions -> elseif
Keybinding: none
Description:

`smarty-template-foreach'

Menu: Smarty -> Templates -> Build-in Functions -> foreach
Keybinding: none
Description:

`smarty-template-foreachelse'

Menu: Smarty -> Templates -> Build-in Functions -> foreachelse
Keybinding: none
Description:

`smarty-template-if'

Menu: Smarty -> Templates -> Build-in Functions -> if
Keybinding: none
Description:

`smarty-template-include'

Menu: Smarty -> Templates -> Build-in Functions -> include
Keybinding: none
Description:

`smarty-template-include-php'

Menu: Smarty -> Templates -> Build-in Functions -> include_php
Keybinding: none
Description:

`smarty-template-insert'

Menu: Smarty -> Templates -> Build-in Functions -> insert
Keybinding: none
Description:

`smarty-template-ldelim'

Menu: Smarty -> Templates -> Build-in Functions -> ldelim
Keybinding: none
Description:

`smarty-template-literal'

Menu: Smarty -> Templates -> Build-in Functions -> literal
Keybinding: none
Description:

`smarty-template-php'

Menu: Smarty -> Templates -> Build-in Functions -> php
Keybinding: none
Description:

`smarty-template-rdelim'

Menu: Smarty -> Templates -> Build-in Functions -> rdelim
Keybinding: none
Description:

`smarty-template-section'

Menu: Smarty -> Templates -> Build-in Functions -> section
Keybinding: none
Description:

`smarty-template-sectionelse'

Menu: Smarty -> Templates -> Build-in Functions -> sectionelse
Keybinding: none
Description:

`smarty-template-strip'

Menu: Smarty -> Templates -> Build-in Functions -> strip
Keybinding: none
Description:


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.2.2 Custom Functions

`smarty-template-assign'

Menu: Smarty -> Templates -> Custom Functions -> assign
Keybinding: none
Description:

`smarty-template-counter'

Menu: Smarty -> Templates -> Custom Functions -> counter
Keybinding: none
Description:

`smarty-template-cycle'

Menu: Smarty -> Templates -> Custom Functions -> cycle
Keybinding: none
Description:

`smarty-template-debug'

Menu: Smarty -> Templates -> Custom Functions -> debug
Keybinding: none
Description:

`smarty-template-eval'

Menu: Smarty -> Templates -> Custom Functions -> eval
Keybinding: none
Description:

`smarty-template-fetch'

Menu: Smarty -> Templates -> Custom Functions -> fetch
Keybinding: none
Description:

`smarty-template-html-checkboxes'

Menu: Smarty -> Templates -> Custom Functions -> html_checkboxes
Keybinding: none
Description:

`smarty-template-html-image'

Menu: Smarty -> Templates -> Custom Functions -> html_image
Keybinding: none
Description:

`smarty-template-html-options'

Menu: Smarty -> Templates -> Custom Functions -> html_options
Keybinding: none
Description:

`smarty-template-html-radios'

Menu: Smarty -> Templates -> Custom Functions -> html_radios
Keybinding: none
Description:

`smarty-template-html-select-date'

Menu: Smarty -> Templates -> Custom Functions -> html_select_date
Keybinding: none
Description:

`smarty-template-html-select-time'

Menu: Smarty -> Templates -> Custom Functions -> html_select_time
Keybinding: none
Description:

`smarty-template-html-table'

Menu: Smarty -> Templates -> Custom Functions -> html_table
Keybinding: none
Description:

`smarty-template-mailto'

Menu: Smarty -> Templates -> Custom Functions -> mailto
Keybinding: none
Description:

`smarty-template-math'

Menu: Smarty -> Templates -> Custom Functions -> math
Keybinding: none
Description:

`smarty-template-popup'

Menu: Smarty -> Templates -> Custom Functions -> popup
Keybinding: none
Description:

`smarty-template-popup-init'

Menu: Smarty -> Templates -> Custom Functions -> popup_init
Keybinding: none
Description:

`smarty-template-textformat'

Menu: Smarty -> Templates -> Custom Functions -> textformat
Keybinding: none
Description:


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.2.3 Variable Modifiers

`smarty-template-capitalize'

Menu: Smarty -> Templates -> Variable Modifiers -> capitalize
Keybinding: none
Description:

`smarty-template-cat'

Menu: Smarty -> Templates -> Variable Modifiers -> cat
Keybinding: none
Description:

`smarty-template-count-characters'

Menu: Smarty -> Templates -> Variable Modifiers -> count_characters
Keybinding: none
Description:

`smarty-template-count-paragraphs'

Menu: Smarty -> Templates -> Variable Modifiers -> count_paragraphs
Keybinding: none
Description:

`smarty-template-count-sentences'

Menu: Smarty -> Templates -> Variable Modifiers -> count_sentences
Keybinding: none
Description:

`smarty-template-count-words'

Menu: Smarty -> Templates -> Variable Modifiers -> count_words
Keybinding: none
Description:

`smarty-template-date-format'

Menu: Smarty -> Templates -> Variable Modifiers -> date_format
Keybinding: none
Description:

`smarty-template-default'

Menu: Smarty -> Templates -> Variable Modifiers -> default
Keybinding: none
Description:

`smarty-template-escape'

Menu: Smarty -> Templates -> Variable Modifiers -> escape
Keybinding: none
Description:

`smarty-template-indent'

Menu: Smarty -> Templates -> Variable Modifiers -> indent
Keybinding: none
Description:

`smarty-template-lower'

Menu: Smarty -> Templates -> Variable Modifiers -> lower
Keybinding: none
Description:

`smarty-template-nl2br'

Menu: Smarty -> Templates -> Variable Modifiers -> nl2br
Keybinding: none
Description:

`smarty-template-regex-replace'

Menu: Smarty -> Templates -> Variable Modifiers -> regex_replace
Keybinding: none
Description:

`smarty-template-replace'

Menu: Smarty -> Templates -> Variable Modifiers -> replace
Keybinding: none
Description:

`smarty-template-spacify'

Menu: Smarty -> Templates -> Variable Modifiers -> spacify
Keybinding: none
Description:

`smarty-template-string-format'

Menu: Smarty -> Templates -> Variable Modifiers -> string_format
Keybinding: none
Description:

`smarty-template-vstrip'

Menu: Smarty -> Templates -> Variable Modifiers -> strip
Keybinding: none
Description:

`smarty-template-strip-tags'

Menu: Smarty -> Templates -> Variable Modifiers -> strip_tags
Keybinding: none
Description:

`smarty-template-truncate'

Menu: Smarty -> Templates -> Variable Modifiers -> truncate
Keybinding: none
Description:

`smarty-template-upper'

Menu: Smarty -> Templates -> Variable Modifiers -> upper
Keybinding: none
Description:

`smarty-template-wordwrap'

Menu: Smarty -> Templates -> Variable Modifiers -> wordwrap
Keybinding: none
Description:


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.2.4 Non-Smarty Functions

`smarty-template-header'

Menu: Smarty -> Templates -> Insert Header
Keybinding: none
Description: This function is used to insert a header in the current buffer.

`smarty-template-footer'

Menu: Smarty -> Templates -> Insert Footer
Keybinding: none
Description: This function is used to insert a footer in the current buffer.

`smarty-template-insert-date'

Menu: Smarty -> Templates -> Insert Date
Keybinding: none
Description: This function is used to insert the date in the current buffer.

`smarty-template-modify'

Menu: Smarty -> Templates -> Modify Date
Keybinding: none
Description: This function is used to modify the last modification date in the current buffer.


[ << ] [ >> ]           [Top] [Contents] [Index] [ ? ]