Phpstorm Live Templates Twig OctoberCMS (Archived: OctoberCMS is totally dead because of greediness)
- OctoberCMS Documentation
- BarrelStrength Twig Live Templates : Refer here for installation
Abbreviation | Description | Code Generated |
---|---|---|
!ph |
Inject to placeholder variable | {% put ... %} ... {% endput %} |
!phd |
Inject to placeholder variable and default | {% put ... %} ... {% endput %} |
!scripts |
Inject to scripts | {% put scripts %} <script> ... </scripts> {% endput %} |
!styles |
Inject to styles | {% put styles%} <style> ... </style> {% endput %} |
comp |
Generate component block | {% component '...' %} |
content |
Generate content block | {% content '...' %} |
dump |
Generate dump block | {{ dump(...) }} |
fajax |
Generate form_ajax block | {{ form_ajax() }} |
fclose |
Generate form_close block | {{ form_close() }} |
flash |
Generate flash block | {% flash %}...{% endflash %} |
fopen |
{{ form_open() }} |
|
for |
{% for ... in ... %} ... {% endfor %} |
|
fore |
{% for ... in ... %} ... {% else %} ... {% endfor %} |
|
hc |
{{ html_clean('...') }} |
|
he |
{{ html_email('...') }} |
|
hl |
{{ html_limit('...') }} |
|
hs |
{{ html_strip('...') }} |
|
if |
Generate if block | {% if ... %} ... {% endif %} |
ife |
Generate if else block | {% if ... %} ... {% else %} ... {% endif %} |
ifs |
Generate if else shorthand | {{ ... ? '...' : '...' }} |
macro |
{% macro var1(...) %} ... {% endmacro var1 %} |
|
page |
{% page %} |
|
partial |
{% partial '...' %} |
|
ph |
{% placeholder ... %} |
|
phd |
{% placeholder ... default %} ... {% endplaceholder %} |
|
scripts |
{% scripts %} |
|
strc |
{{ str_camel(...) }} |
|
strl |
{{ str_limit(...) }} |
|
strpl |
{{ str_plural(...) }} |
|
strsn |
{{ str_snake(...) }} |
|
strsn2 |
{{ str_snake(...), '...' }} |
|
strst |
{{ str_studly(...) }} |
|
strw |
{{ str_words(...) }} |
|
styles |
{% styles %} |
|
tc |
{{ this.controller.var }} |
|
te |
{{ this.environment.var }} |
|
tl |
{{ this.layout.var }} |
|
tpg |
{{ this.page.var }} |
|
tpr |
{{ this.param.var }} |
|
ts |
{{ this.session.var }} |
|
tt |
{{ this.theme.var }} |
|
verb |
{% verbatim %} ... {% endverbatim %} |
|
|app |
{{ '...' | app }} |
|
|d |
{{ '...' | default }} |
|
|ih |
{{ '...' | imageHeight }} |
|
|iw |
{{ '...' | imageWidth }} |
|
|md |
{{ '...' | md }} |
|
|m |
{{ '...' | media }} |
|
|p |
{{ '...' | page }} |
|
|raw |
{{ '...' | raw }} |
|
|rs |
{{ '...' | resize }} |
|
|th |
{{ '...' | theme }} |
Abbreviation | Description |
---|---|
~html |
HTML boilerplate + meta + combine CSS & JS |
cc |
Combine CSS file |
cj |
Combine JS file |