diff --git a/docs/designers/language-modifiers/language-modifier-capitalize.md b/docs/designers/language-modifiers/language-modifier-capitalize.md index 015bb3bc..ba16d929 100644 --- a/docs/designers/language-modifiers/language-modifier-capitalize.md +++ b/docs/designers/language-modifiers/language-modifier-capitalize.md @@ -1,41 +1,43 @@ -capitalize {#language.modifier.capitalize} -========== +# capitalize (modifier) This is used to capitalize the first letter of all words in a variable. This is similar to the PHP [`ucwords()`](&url.php-manual;ucwords) function. - Parameter Position Type Required Default Description - -------------------- --------- ---------- --------- ----------------------------------------------------------------------------------------------------------- - 1 boolean No FALSE This determines whether or not words with digits will be uppercased - 2 boolean No FALSE This determines whether or not Capital letters within words should be lowercased, e.g. \"aAa\" to \"Aaa\" +## Parameters +| Position | Type | Required | Default | Description | +|----------|---------|----------|---------|-------------------------------------------------------------------------------------------------------| +| 1 | boolean | No | False | This determines whether or not words with digits will be uppercased. | +| 2 | boolean | No | False | This determines whether or not Capital letters within words should be lowercased, e.g. "aAa" to "Aaa" | - assign('articleTitle', 'next x-men film, x3, delayed.'); - - ?> +PHP-script: +```php +$smarty->assign('articleTitle', 'next x-men film, x3, delayed.'); +``` Where the template is: - +```smarty {$articleTitle} {$articleTitle|capitalize} {$articleTitle|capitalize:true} - - +``` + Will output: - +``` next x-men film, x3, delayed. Next X-Men Film, x3, Delayed. Next X-Men Film, X3, Delayed. +``` +## See also - -See also [`lower`](#language.modifier.lower) and -[`upper`](#language.modifier.upper) +- [lower (modifier)](./language-modifier-lower.md) +- [upper (modifier)](./language-modifier-upper.md) diff --git a/docs/designers/language-modifiers/language-modifier-cat.md b/docs/designers/language-modifiers/language-modifier-cat.md index 1f43ae17..1afb05d1 100644 --- a/docs/designers/language-modifiers/language-modifier-cat.md +++ b/docs/designers/language-modifiers/language-modifier-cat.md @@ -1,31 +1,26 @@ -cat {#language.modifier.cat} -=== +# cat (modifier) This value is concatenated to the given variable. - Parameter Position Type Required Default Description - -------------------- -------- ---------- --------- ----------------------------------------------- - 1 string No *empty* This value to catenate to the given variable. +## Parameters +| Position | Type | Required | Default | Description | +|----------|--------|----------|---------|-----------------------------------------------| +| 1 | string | No | *empty* | This value to catenate to the given variable. | - assign('articleTitle', "Psychics predict world didn't end"); - - ?> - - +## Example +PHP-script: +```php +$smarty->assign('articleTitle', "Psychics predict world didn't end"); +``` + Where template is: - - - {$articleTitle|cat:' yesterday.'} - - +```smarty + {$articleTitle|cat:' yesterday.'} +``` Will output: - - +``` Psychics predict world didn't end yesterday. - - +```