Introduction of loop scopes.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
{include file='includes/header.inc.html'}
|
||||
|
||||
<div class="loginpage">
|
||||
|
||||
{{intl l='abcd'}|capitalize}
|
||||
<div class="brandbar container">
|
||||
<a class="brand" href="index.php">{images file='assets/img/logo-thelia-34px.png'}<img src="{$asset_url}" alt="{intl l='Thelia, solution e-commerce libre'}" />{/images}</a>
|
||||
</div>
|
||||
@@ -15,7 +15,7 @@
|
||||
<div class="hero-unit">
|
||||
<h1>{intl l='Thelia Back Office'}</h1>
|
||||
|
||||
<form action="/admin" method="post" class="well form-inline" {form_enctype form=$form}>
|
||||
<form action="admin/login" method="post" class="well form-inline" {form_enctype form=$form}>
|
||||
{form_field_hidden form=$form}
|
||||
{form_field form=$form.username}
|
||||
{form_error form=$form.username}
|
||||
@@ -27,7 +27,9 @@
|
||||
<input type="password" class="input" placeholder="{intl l='Password'}" name="{$name}" />
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form.remember_me}
|
||||
<label class="checkbox"> <input type="checkbox" name="remember" value="yes"> {intl l='Remember me'}</label>
|
||||
{/form_field}
|
||||
|
||||
<button type="submit" class="btn btn-primary">{intl l='Login'} <i class="icon-play"></i></button>
|
||||
</form>
|
||||
|
||||
@@ -1,8 +1,39 @@
|
||||
{include file="included.html"}
|
||||
|
||||
{loop name="category0" type="category" parent="0"}
|
||||
<h2>1 - CATEGORY : #TITLE</h2>
|
||||
<hr /><hr />
|
||||
{loop name="category1" type="category" parent="#ID"}
|
||||
<h3>2 - SUBCATEGORY : #TITLE</h3>
|
||||
<h2>Out before - CATEGORY : #TITLE (#LOOP_COUNT / #LOOP_TOTAL)</h2>
|
||||
{loop name="category1" type="category" parent="#ID"}
|
||||
<h3>Inner - SUBCATEGORY : #TITLE (#LOOP_COUNT / #LOOP_TOTAL)</h3>
|
||||
{/loop}
|
||||
|
||||
{#myid=#ID}
|
||||
|
||||
{loop name="category2" type="category" parent="#ID"}
|
||||
<h3>Inner 2 before - SUBCATEGORY : #TITLE (#LOOP_COUNT / #LOOP_TOTAL)</h3>
|
||||
|
||||
{loop name="category3" type="category" parent="#myid"}
|
||||
<h3>Inner inner 2 - SUBCATEGORY : #TITLE (#LOOP_COUNT / #LOOP_TOTAL)</h3>
|
||||
{/loop}
|
||||
|
||||
<h3>Inner 2 after - SUBCATEGORY : #TITLE (#LOOP_COUNT / #LOOP_TOTAL)</h3>
|
||||
{/loop}
|
||||
|
||||
<h2>Out after - CATEGORY : #TITLE (#LOOP_COUNT / #LOOP_TOTAL)</h2>
|
||||
<hr />
|
||||
|
||||
{ifloop rel="category2"}
|
||||
<p>Hey, y'a d'la categorie 2 !</p>
|
||||
{/ifloop}
|
||||
|
||||
{elseloop rel="category2"}
|
||||
<p>Hey, y'a PAS de categorie 2 !</p>
|
||||
{/elseloop}
|
||||
|
||||
{loop name="category2" type="category" parent="#myid"}
|
||||
<h3>Exter 2 - SUBCATEGORY : #TITLE (#LOOP_COUNT / #LOOP_TOTAL)</h3>
|
||||
{/loop}
|
||||
{/loop}
|
||||
|
||||
{loop name="category2" type="category" parent="1"}
|
||||
<h3>Final Exter 2 - SUBCATEGORY : #TITLE (#LOOP_COUNT / #LOOP_TOTAL)</h3>
|
||||
{/loop}
|
||||
<h2>1bis - CATEGORY : #TITLE</h2>
|
||||
{/loop}
|
||||
12
templates/smarty-sample/included.html
Normal file
12
templates/smarty-sample/included.html
Normal file
@@ -0,0 +1,12 @@
|
||||
{loop name="included0" type="category" parent="0"}
|
||||
<h2>Out before - CATEGORY : #TITLE (#LOOP_COUNT / #LOOP_TOTAL)</h2>
|
||||
{loop name="category1" type="category" parent="#ID"}
|
||||
<h3>Inner - SUBCATEGORY : #TITLE (#LOOP_COUNT / #LOOP_TOTAL)</h3>
|
||||
{/loop}
|
||||
|
||||
{loop name="category2" type="category" parent="#ID"}
|
||||
<h3>Inner 2 - SUBCATEGORY : #TITLE (#LOOP_COUNT / #LOOP_TOTAL)</h3>
|
||||
{/loop}
|
||||
<h2>Out after - CATEGORY : #TITLE (#LOOP_COUNT / #LOOP_TOTAL)</h2>
|
||||
<hr />
|
||||
{/loop}
|
||||
Reference in New Issue
Block a user