[TYPO3-dev] Nested CONTENT/select bug
Peter Klein
peter at clioonline.dk
Tue Jul 26 18:14:19 CEST 2011
I have a weird problem (Bug?)
The Typoscript below creates a "menu" of pages, sorted into sections
based on the 1st letter of the page title.
First it selects the pages and group the results by the 1st char of
the title.
It then uses the result from the 1st select (the first char) and makes
a 2nd select with "title LIKE '%>firstchar>'" to display the actual
page titles.
But instead of displaying all the results, it skips the 1st page in
every section.??
Is this a bug or a "feature" ? :)
-- Example Start --
lib.cliolibrary = COA
lib.cliolibrary {
# Create a "menu" based on the 1st char of the page titles
10 = COA
10 {
wrap = <ul class="tx-cliolibrary-menu">|</ul>
# 1st we select the titles grouped by the 1st char of
the page title
10 = CONTENT
10.table = pages
10.selectFields = *
10.select.pidInList = 1797
10.select.orderBy = title
10.select.groupBy = left(ucase(title),1)
10.renderObj = COA
10.renderObj {
wrap = <li>|</li>
# And render each "menuitem" as the 1st char
of the title
10 = TEXT
10.field = title
10.substring = 0,1
10.case = upper
10.typolink.parameter = #
10.typolink.ATagParams.cObject = COA
10.typolink.ATagParams.cObject {
10 = TEXT
10.field = uid
10.wrap =
onclick="showlibrary('library-|');return false;"
}
}
}
20 = COA
20 {
wrap = <div id="tx-cliolibrary-content"
class="tx-cliolibrary-content">|</div>
# 1st we select the titles grouped by the 1st char of
the page title
10 = CONTENT
10.table = pages
10.select.pidInList = 1797
10.select.orderBy = title
10.select.groupBy = left(ucase(title),1)
10.renderObj = COA
10.renderObj {
# Store the 1st char of the page title in a
register for later use
5 = LOAD_REGISTER
5.librarysection = TEXT
5.librarysection.field = title
5.librarysection.substring = 0,1
5.librarysection.case = upper
10 = TEXT
10.field= uid
10.wrap = <div class="cliolibrary"
id="library-|" style="display:none;">
# Here's the weird pard (bug)
# Without object 15 & 17, the 1st page of each
section is not displayed.
15 = TEXT
15.field = title
15.typolink.parameter.field = uid
15.wrap = <h3>|</h3>
17 = TEXT
17.field = subtitle
17.required = 1
17.wrap = <p>|</p>
# now we get the pages whichs stats with the
letter we previously stored in the register
20 = CONTENT
20.table = pages
20.select.pidInList = 1797
#20.select.orderBy = title
20.select.begin = 0
20.select.andWhere.dataWrap = title LIKE
'{register:librarysection}%'
20.renderObj = COA
20.renderObj {
# This CONTENT/select skips the 1st
page in each section.
10 = TEXT
10.field = title
10.typolink.parameter.field = uid
10.wrap = <h3>|</h3>
20 = TEXT
20.field = subtitle
20.required = 1
20.wrap = <p>|</p>
}
30 = TEXT
30.value = </div>
}
}
}
-- Example End --
More information about the TYPO3-dev
mailing list