vLIB
Welcome, Guest. Please login or register.
Did you miss your activation email?
Fri, 21. December 2007 - 09:17:11

Login with username, password and session length
Search:     Advanced search
Please register with your real name and do not post any SPAM! Violations: "Hk." and "Getagrip" => deleted
1.459 Posts in 346 Topics by 21 Members
Latest Member: Tim81
* Home Help Search Login Register
+  vLIB
|-+  English support
| |-+  vlibTemplate, vlibMimeMail, vlibDate
| | |-+  block parsing sequence
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Print
Author Topic: block parsing sequence  (Read 634 times)
vlad
Guest
on: Thu, 24. February 2005 - 11:28:41

I have 3 blocks:

<TMPL_LOOP name="some1">
some1 some1 some1 some1 some1 some1
</TMPL_LOOP>

<TMPL_LOOP name="some2">
some2 some2 some2 some2 some2 some2
</TMPL_LOOP>

<TMPL_LOOP name="some3">
some3 some3some3 some3 some3 some3
</TMPL_LOOP>


=============================
How I can get HTML with another sequence (depending on user settins)

some3 some3some3 some3 some3 some3
some1 some1 some1 some1 some1 some1
some2 some2 some2 some2 some2 some2

OR

some2 some2 some2 some2 some2 some2
some3 some3some3 some3 some3 some3
some1 some1 some1 some1 some1 some1
Logged
ClausVB
Administrator
Hero Member
*****
Offline Offline

Posts: 496



WWW
Reply #1 on: Fri, 25. February 2005 - 14:36:18

Quote
How I can get HTML with another sequence (depending on user settins)
You should do it in your PHP code. In a query you could use different "ORDER BY" statements. In an array you could use ASC or DESC sort algorithm.

Here is an example. It could be modified easily with "ORDER BY".

Create your loop arrays as you want to:

Code:
some1 = array;
while row = mysql_fetch_arrayresult
{
   array_pushtable_data, array
        name = rowname_user1,
        birthday = date-formatDaterowbirthday_user1, %A, %d.%m.%Y,
        city = rowcity_user1
        
    ;
}
tmpl-setloopsome1, some1;
or

Code:
some1 = array;
while row = mysql_fetch_arrayresult
{
   array_pushtable_data, array
        name = rowname_user2,
        birthday = date-formatDaterowbirthday_user2, %A, %d.%m.%Y,
        city = rowcity_user2
        
    ;
}
tmpl-setloopsome1, some1;
Regards,
Claus
Last Edit: Fri, 25. February 2005 - 14:41:49 by ClausVB Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!