mirror of
https://github.com/fenom-template/fenom.git
synced 2023-08-10 21:13:07 +03:00
Update doc
This commit is contained in:
parent
f4bc88a97d
commit
b2f2e61be4
|
@ -41,7 +41,7 @@ Conversation about [tags](./syntax.md#tags)
|
||||||
* [capture](./tags/capture.md)
|
* [capture](./tags/capture.md)
|
||||||
* [filter](./tags/filter.md)
|
* [filter](./tags/filter.md)
|
||||||
* [ignore](./tags/ignore.md)
|
* [ignore](./tags/ignore.md)
|
||||||
* [macros](./tags/macros.md)
|
* [macro](./tags/macro.md)
|
||||||
* [import](./tags/import.md)
|
* [import](./tags/import.md)
|
||||||
|
|
||||||
**Extends**
|
**Extends**
|
||||||
|
|
26
docs/operators.md
Normal file
26
docs/operators.md
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
Operators
|
||||||
|
=========
|
||||||
|
|
||||||
|
Math
|
||||||
|
|
||||||
|
`+ - / *`
|
||||||
|
|
||||||
|
Bitwize
|
||||||
|
|
||||||
|
`| & <<`
|
||||||
|
|
||||||
|
Unary
|
||||||
|
|
||||||
|
`^ ~ - !`
|
||||||
|
|
||||||
|
Boolean
|
||||||
|
|
||||||
|
`|| && and or < > <= >= == === !== != ≥ ≤ ≠`
|
||||||
|
|
||||||
|
Ternar
|
||||||
|
|
||||||
|
`? :`
|
||||||
|
|
||||||
|
Test
|
||||||
|
|
||||||
|
`is in like`
|
|
@ -13,12 +13,6 @@ Tag {extends}
|
||||||
{extends $parent_tpl}
|
{extends $parent_tpl}
|
||||||
```
|
```
|
||||||
|
|
||||||
```smarty
|
|
||||||
{if $theme?}
|
|
||||||
{extends $theme.template}
|
|
||||||
{/if}
|
|
||||||
```
|
|
||||||
|
|
||||||
### {block}
|
### {block}
|
||||||
|
|
||||||
```smarty
|
```smarty
|
||||||
|
|
|
@ -4,3 +4,10 @@ Tag {import}
|
||||||
```smarty
|
```smarty
|
||||||
{import 'page.macros.tpl'}
|
{import 'page.macros.tpl'}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
```smarty
|
||||||
|
{import 'listing.tpl' as listing}
|
||||||
|
...
|
||||||
|
{listing.paginator current=5 count=100}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
20
docs/tags/macro.md
Normal file
20
docs/tags/macro.md
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
Tag {macro}
|
||||||
|
============
|
||||||
|
|
||||||
|
Declare
|
||||||
|
|
||||||
|
```smarty
|
||||||
|
declare macros
|
||||||
|
|
||||||
|
{macro paginator(current, total, skip=true)}
|
||||||
|
... paginator code ...
|
||||||
|
{/macro}
|
||||||
|
```
|
||||||
|
|
||||||
|
Invoke
|
||||||
|
|
||||||
|
```smarty
|
||||||
|
{paginator current=$page total=100}
|
||||||
|
```
|
||||||
|
|
||||||
|
Use tag [{import}](./import.md) for extending macros for another templates.
|
|
@ -1,15 +0,0 @@
|
||||||
Tag {macros}
|
|
||||||
============
|
|
||||||
|
|
||||||
|
|
||||||
```smarty
|
|
||||||
declare macros
|
|
||||||
|
|
||||||
{macros.paginator(current, total, skip=true)}
|
|
||||||
... paginator code ...
|
|
||||||
{/macros}
|
|
||||||
...
|
|
||||||
invoke macros
|
|
||||||
|
|
||||||
{macros.paginator current=$page total=100}
|
|
||||||
```
|
|
Loading…
Reference in New Issue
Block a user