[Typo3] TemplaVoila and Section Index fix
Martin Klaus
klausm at in.tum.de
Sat May 28 14:09:40 CEST 2005
Hi List,
CType Menu / Section Index uses < styles.content.get and the sorting field
for displaying the section index items. This doesn't work in TemplaVoila,
because the sorting field isn't used anymore.
So the section index elements are displayed in wrong order (or even unused
elements are displayed, and so on)....
[see TemplaVoila Bug: http://bugs.typo3.org/view.php?id=465]
I've found a temporary fix to get the CType Menu / Section Index work in
TemplaVoila:
(my solution uses LOAD_REGISTER)
##############
1.) add this TypoScript Code to your datastructure xml:
(in the fields where you store Content Elements)
<TypoScript>
5 = LOAD_REGISTER
5.recordsInTVField.data = current:1
10 = RECORDS
10.source.current=1
10.tables = tt_content
15 = RESTORE_REGISTER
</TypoScript>
############
2.) replace code of "tt_content.menu.20.3." :
-----
# "Section index (pagecontent w/Index checked)"
3 < styles.content.get
3.wrap = <div class="csc-menu csc-menu-3">|</div>
3.select.andWhere = sectionIndex!=0
3.select.pidInList.override.field = pages
3.renderObj = TEXT
3.renderObj {
fieldRequired = header
trim=1
field = header
htmlSpecialChars = 1
wrap = <p class="csc-section">|</p>
typolink.parameter.field = pid
typolink.section.field = uid
}
------
with:
-----
# "Section index (pagecontent w/Index checked)"
3 = RECORDS
3.wrap = <div class="csc-menu csc-menu-3">|</div>
3.source.data = register:recordsInTVField
3.tables = tt_content
3.conf.tt_content = TEXT
3.conf.tt_content {
noBlur = 1 #XXX added
fieldRequired = header
trim=1
field = header
htmlSpecialChars = 1
wrap = <p class="csc-section">|</p>
typolink.parameter.field = pid
typolink.section.field = uid
}
------
and then section index works again with TemplaVoila
....
et (Templa)Voila!
regards,
Martin Klaus
More information about the TYPO3-english
mailing list