Update doc

This commit is contained in:
bzick 2013-02-21 22:47:24 +04:00
parent f4bc88a97d
commit b2f2e61be4
7 changed files with 58 additions and 26 deletions

View File

@ -41,7 +41,7 @@ Conversation about [tags](./syntax.md#tags)
* [capture](./tags/capture.md)
* [filter](./tags/filter.md)
* [ignore](./tags/ignore.md)
* [macros](./tags/macros.md)
* [macro](./tags/macro.md)
* [import](./tags/import.md)
**Extends**

26
docs/operators.md Normal file
View File

@ -0,0 +1,26 @@
Operators
=========
Math
`+ - / *`
Bitwize
`| & <<`
Unary
`^ ~ - !`
Boolean
`|| && and or < > <= >= == === !== != ≥ ≤ ≠`
Ternar
`? :`
Test
`is in like`

View File

@ -234,9 +234,9 @@
```smarty
{include 'control.tpl'
options=$list
name=$cp.name
type='select'
options = $list
name = $cp.name
type = 'select'
}
{foreach [

View File

@ -13,12 +13,6 @@ Tag {extends}
{extends $parent_tpl}
```
```smarty
{if $theme?}
{extends $theme.template}
{/if}
```
### {block}
```smarty

View File

@ -3,4 +3,11 @@ Tag {import}
```smarty
{import 'page.macros.tpl'}
```
```
```smarty
{import 'listing.tpl' as listing}
...
{listing.paginator current=5 count=100}
```

20
docs/tags/macro.md Normal file
View 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.

View File

@ -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}
```