2023-02-06 14:42:31 +01:00
|
|
|
# cat
|
2021-12-03 11:59:22 +01:00
|
|
|
|
|
|
|
This value is concatenated to the given variable.
|
|
|
|
|
2023-02-06 14:42:31 +01:00
|
|
|
## Basic usage
|
|
|
|
```smarty
|
|
|
|
{$myVar|cat:' units'}
|
|
|
|
```
|
2021-12-03 11:59:22 +01:00
|
|
|
|
2023-02-06 14:42:31 +01:00
|
|
|
## Parameters
|
2021-12-03 11:59:22 +01:00
|
|
|
|
2023-02-06 14:42:31 +01:00
|
|
|
| Parameter | Type | Required | Description |
|
|
|
|
|-----------|--------|----------|--------------------------------------------------|
|
|
|
|
| 1 | string | No | This value to concatenate to the given variable. |
|
2021-12-03 11:59:22 +01:00
|
|
|
|
2023-02-06 14:42:31 +01:00
|
|
|
## Examples
|
2021-12-03 11:59:22 +01:00
|
|
|
|
2023-02-06 14:42:31 +01:00
|
|
|
```php
|
|
|
|
<?php
|
2021-12-03 11:59:22 +01:00
|
|
|
|
2023-02-06 14:42:31 +01:00
|
|
|
$smarty->assign('articleTitle', "Psychics predict world didn't end");
|
2021-12-03 11:59:22 +01:00
|
|
|
|
2023-02-06 14:42:31 +01:00
|
|
|
```
|
2021-12-03 11:59:22 +01:00
|
|
|
|
2023-02-06 14:42:31 +01:00
|
|
|
Where template is:
|
2021-12-03 11:59:22 +01:00
|
|
|
|
2023-02-06 14:42:31 +01:00
|
|
|
```smarty
|
2021-12-03 11:59:22 +01:00
|
|
|
{$articleTitle|cat:' yesterday.'}
|
2023-02-06 14:42:31 +01:00
|
|
|
```
|
2021-12-03 11:59:22 +01:00
|
|
|
|
|
|
|
Will output:
|
|
|
|
|
2023-02-06 14:42:31 +01:00
|
|
|
```
|
2021-12-03 11:59:22 +01:00
|
|
|
Psychics predict world didn't end yesterday.
|
2023-02-06 14:42:31 +01:00
|
|
|
```
|
2021-12-03 11:59:22 +01:00
|
|
|
|