mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 17:21:39 +09:00
Implement template v2 feature of pushing to stack
This commit is contained in:
parent
7b518ab747
commit
c19d71847f
5 changed files with 95 additions and 8 deletions
7
tests/_data/template/v2pushstack.executed.html
Normal file
7
tests/_data/template/v2pushstack.executed.html
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
|
||||
<ul>
|
||||
<li>Rhymix</li>
|
||||
<li>XE</li>
|
||||
<li>WordPress</li>
|
||||
<li>Drupal</li>
|
||||
</ul>
|
||||
27
tests/_data/template/v2pushstack.html
Normal file
27
tests/_data/template/v2pushstack.html
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
@version(2)
|
||||
|
||||
<?php $foo = 42; ?>
|
||||
|
||||
@push('cms')
|
||||
<li>XE</li>
|
||||
@endpush
|
||||
|
||||
@push('cms')
|
||||
<li>WordPress</li>
|
||||
@end
|
||||
|
||||
@pushIf($foo, 'cms')
|
||||
<li>Drupal</li>
|
||||
@endPushIf
|
||||
|
||||
@prepend('cms')
|
||||
<li>Rhymix</li>
|
||||
@endprepend
|
||||
|
||||
@prependIf(!$foo, 'cms')
|
||||
<li>Joomla</li>
|
||||
@end
|
||||
|
||||
<ul>
|
||||
@stack('cms')
|
||||
</ul>
|
||||
Loading…
Add table
Add a link
Reference in a new issue