Integration of Assetic in SmartyParser, extended it to Admin (we can now
use loops !), added the Thelia ControllerResolver and fixed config and routing accordingly.²:wq
This commit is contained in:
@@ -1,61 +1,77 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
</head>
|
||||
<body>
|
||||
<div>
|
||||
<p>Category loop example</p>
|
||||
{loop type="category" name="catloop1"}
|
||||
{$__COUNT__}/{$__TOTAL__} : {$ID} {$TITLE} <br />
|
||||
nb child : {$NB_CHILD} <br /><br />
|
||||
{/loop}
|
||||
</div>
|
||||
{include file="includes/header.html"}
|
||||
<div>
|
||||
An image from asset directory :
|
||||
{images file='assets/img/logo-thelia-34px.png'}<img src="{$asset_url}" alt="{intl l='Thelia, solution e-commerce libre'}" />{/images}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<p>Conditional example #1</p>
|
||||
<div>
|
||||
{intl l='An internationalized string'}
|
||||
</div>
|
||||
|
||||
{notempty name="catloop2"}
|
||||
Loop catloop2 is not empty: <ul>
|
||||
{loop type="category" name="catloop2" parent="12"}
|
||||
<li>{$__COUNT__}/{$__TOTAL__} : {$ID} {$TITLE}</li>
|
||||
{/loop}
|
||||
</ul>
|
||||
{/notempty}
|
||||
<div>
|
||||
jQuery data: <span id="jquery_block"></span>
|
||||
</div>
|
||||
|
||||
{empty name="catloop2"}
|
||||
<p>Loop catloop2 is empty</p>
|
||||
{/empty}
|
||||
<div>
|
||||
<p>Category loop example</p>
|
||||
<ul>
|
||||
{loop type="category" name="catloop1"}
|
||||
<li>{$__COUNT__}/{$__TOTAL__} : {$ID} {$TITLE}, children: {$NB_CHILD}
|
||||
{ifloop rel="inner1"}
|
||||
<ul>
|
||||
{loop type="category" name="inner1" parent="{$ID}"}
|
||||
<li>Sub cat {$ID} (parent is {$PARENT}): {$TITLE}</li>
|
||||
{/loop}
|
||||
</ul>
|
||||
{/ifloop}
|
||||
</li>
|
||||
{/loop}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div>
|
||||
<p>Conditional example #1</p>
|
||||
|
||||
<div>
|
||||
<p>Conditional example #2</p>
|
||||
{ifloop rel="catloop2"}
|
||||
Hey ! Loop catloop2 is not empty:
|
||||
<ul>
|
||||
{loop type="category" name="catloop2" parent="12"}
|
||||
<li>{$__COUNT__}/{$__TOTAL__} : {$ID} {$TITLE}</li>
|
||||
{/loop}
|
||||
</ul>
|
||||
{/ifloop}
|
||||
|
||||
{notempty name="catloop3"}
|
||||
Loop catloop3 is not empty: <ul>
|
||||
{loop type="category" name="catloop3" parent="0"}
|
||||
<li>{$__COUNT__}/{$__TOTAL__} : {$ID} {$TITLE}</li>
|
||||
{/loop}
|
||||
</ul>
|
||||
{/notempty}
|
||||
{elseloop rel="catloop2"}
|
||||
<p>Loop catloop2 is empty</p>
|
||||
{/elseloop}
|
||||
</div>
|
||||
|
||||
{empty name="catloop3"}
|
||||
<p>Loop catloop3 is empty</p>
|
||||
{/empty}
|
||||
<div>
|
||||
<p>Conditional example #2</p>
|
||||
|
||||
{empty name="catloop2"}
|
||||
<p>... but catloop2 is still empty :-)</p>
|
||||
{/empty}
|
||||
{ifloop rel="catloop3"}
|
||||
Loop catloop3 is not empty:
|
||||
<ul>
|
||||
{loop type="category" name="catloop3" parent="0"}
|
||||
<li>{$__COUNT__}/{$__TOTAL__} : {$ID} {$TITLE}</li>
|
||||
{/loop}
|
||||
</ul>
|
||||
{/ifloop}
|
||||
|
||||
</div>
|
||||
{elseloop rel="catloop3"}
|
||||
<p>Loop catloop3 is empty</p>
|
||||
{/elseloop}
|
||||
|
||||
<div>
|
||||
<p>Traditional for loop</p>
|
||||
{for $index=5 to 12 step 1}
|
||||
Compteur = {$index}<br />
|
||||
{/for}
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
{elseloop rel="catloop2"}
|
||||
<p>... but catloop2 is still empty :-)</p>
|
||||
{/elseloop}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<p>Traditional for loop</p>
|
||||
{for $index=5 to 12 step 1}
|
||||
Compteur = {$index}<br />
|
||||
{/for}
|
||||
</div>
|
||||
|
||||
{include file="includes/footer.html"}
|
||||
Reference in New Issue
Block a user