Created
July 1, 2013 08:29
-
-
Save dmitryd/5899247 to your computer and use it in GitHub Desktop.
Two column layout using TypoScript-only, no tables.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Fetch&render fe_users (just as an example) | |
temp.userList = RECORDS | |
temp.userList { | |
source.field = users | |
tables = fe_users | |
conf.fe_users = COA | |
conf.fe_users { | |
10 = ... | |
wrap = <li>|</li> | |
} | |
wrap = <ul class="user-list">|</ul> | |
} | |
# Render users | |
plugin.tx_whatever.rendering.addressList.two_columns = COA | |
plugin.tx_whatever.rendering.addressList.two_columns { | |
10 = LOAD_REGISTER | |
10 { | |
column_number = 1 | |
} | |
20 < temp.userList | |
20 { | |
wrap > | |
conf.fe_users.stdWrap { | |
preCObject = TEXT | |
preCObject { | |
dataWrap = <ul class="user-list two-columns"> | |
if { | |
value.data = register:column_number | |
equals = 1 | |
} | |
} | |
postCObject = TEXT | |
postCObject { | |
value = </ul> | |
if { | |
value.data = register:column_number | |
equals = 2 | |
} | |
} | |
append = CASE | |
append { | |
key.data = register:column_number | |
1 = COA | |
1 { | |
10 = RESTORE_REGISTER | |
20 = LOAD_REGISTER | |
20.column_number = 2 | |
} | |
2 = COA | |
2 { | |
10 = RESTORE_REGISTER | |
20 = LOAD_REGISTER | |
20.column_number = 1 | |
} | |
} | |
} | |
} | |
stdWrap { | |
append = COA | |
append { | |
10 = TEXT | |
10 { | |
value = </ul> | |
if { | |
value.data = register:column_number | |
equals = 1 | |
} | |
} | |
20 = RESTORE_REGISTER | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment