Made a start on improved layout

This commit is contained in:
Simon Wisselink
2022-09-27 14:36:52 +02:00
parent 1ff79c6c38
commit 8b4d380103
2 changed files with 35 additions and 38 deletions

View File

@@ -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" |
<?php
## Example
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)

View File

@@ -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. |
<?php
## Example
PHP-script:
```php
$smarty->assign('articleTitle', "Psychics predict world didn't end");
?>
```
Where template is:
```smarty
{$articleTitle|cat:' yesterday.'}
```
Will output:
```
Psychics predict world didn't end yesterday.
```