[Frage] tt_address mit Auswahlliste nach Nachname TYPO3-Version: 8.7.9

  • Hoge Hoge
    Jedi-Ritter
    0 x
    130 Beiträge
    0 Hilfreiche Beiträge
    16. 06. 2018, 18:08

    Liebe Leute,

    ich habe seit einiger Zeit dieses TS im Einsatz um eine Adressliste aus tt_adrress mit einer alphabetischen Suchfunktion zu versehen. Nach dem Update von TYPO3 7 auf 8 geht das nicht mehr. Die Liste wird unsortiert und vollständig geladen. Kann das was mit dem CacheHash zu tun haben?
    Ich blick es nicht.
    [code]lib.tt_address.list_by_lastname = COA
    lib.tt_address.list_by_lastname {

    1 = LOAD_REGISTER
    1 {
    lll_grender_f = TEXT
    lll_grender_f.data = LLL:{$FILE.locallang}:tt_address.grender_f
    lll_grender_m = TEXT
    lll_grender_m.data = LLL:{$FILE.locallang}:tt_address.grender_m
    lll_phone = TEXT
    lll_phone.data = LLL:{$FILE.locallang}:tt_address.phone
    lll_mobile = TEXT
    lll_mobile.data = LLL:{$FILE.locallang}:tt_address.mobile
    lll_fax = TEXT
    lll_fax.data = LLL:{$FILE.locallang}:tt_address.fax
    lll_email = TEXT
    lll_email.data = LLL:{$FILE.locallang}:tt_address.email
    lll_www = TEXT
    lll_www.data = LLL:{$FILE.locallang}:tt_address.www
    }

    # the lastname select list
    10 = COA
    10 {

    1 = LOAD_REGISTER
    1 {
    firstLetter.value =
    }

    10 = CONTENT
    10 {
    # Tabellenname
    table = tt_address
    select{
    # PID welche bei tt_address drin steht
    pidInList= 27
    #{$lib.tt_address.list.pidList}
    # Sortierung
    orderBy = last_name
    # Feld einschräkung
    selectFields = last_name
    # Maximale Anzahl
    #max = 10
    # aktuelle Sprache berücksichtigen
    languageField = sys_language_uid
    }

    renderObj = COA
    renderObj {
    5 = LOAD_REGISTER
    5 {
    fLetter = TEXT
    fLetter {
    field = last_name
    crop = 1|
    }
    }

    10 = TEXT
    10 {
    data = field:last_name
    innerWrap = |
    crop = 1|
    typolink {
    # PID der Ziel Seite
    parameter.data = TSFE:id
    useCacheHash = 1
    additionalParams = &tx_ttaddress_pi1[last_name]={register:fLetter}
    additionalParams.insertData = 1

    ATagParams = class="cur"
    ATagParams {
    if {
    value.data = GP:tx_ttaddress_pi1|last_name
    value {
    # Default Wert, wenn kein Param
    override = A
    override {
    if.isFalse.data = GP:tx_ttaddress_pi1|all // GP:tx_ttaddress_pi1|last_name
    }
    }
    equals.field = last_name
    equals.crop = 1|
    }
    }
    }
    # nur wenn nicht bereits vorhanden
    if {
    value.data = register:firstLetter
    equals.field = last_name
    equals.crop = 1|
    negate = 1
    }
    wrap = <li>|</li>
    }

    15 = LOAD_REGISTER
    15 {
    firstLetter.field = last_name
    firstLetter.crop = 1|
    }

    }
    wrap = <ul class="ttaddressLetterList clearfix">|</ul>
    }
    }

    # show all
    15 = TEXT
    15 {
    value = alle anzeigen
    lang.en = view all
    typolink {
    # PID der Ziel Seite
    parameter.data = TSFE:id
    useCacheHash = 1
    additionalParams = &tx_ttaddress_pi1[all]=1
    additionalParams.insertData = 1
    }
    wrap = <div class="ttaddressShowAll">|</div>
    }

    # the adress list
    20 = COA
    20 {

    10 = CONTENT
    10 {
    table = tt_address
    select{
    # PID welche tt_address enthält
    pidInList= 27
    #{$lib.tt_address.list.pidList}
    # Sortierung
    orderBy = zip
    # Feld einschräkung - performance ?
    #selectFields = first_name,last_name,title,email,phone,mobile,www,address,building,room,company,city,zip,region,country,image,fax
    # einschräkung auf Nachname
    andWhere {
    data = GP:tx_ttaddress_pi1|last_name
    # SQL-Injection verhindern
    crop = 1|
    wrap = tt_address.last_name LIKE('|%')
    # default Wert
    override = A
    override {
    if.isFalse.data = GP:tx_ttaddress_pi1|last_name
    }
    if.isFalse.data = GP:tx_ttaddress_pi1|all
    }
    # aktuelle Sprache berücksichtigen
    languageField = sys_language_uid
    }

    renderObj = COA
    renderObj {

    5 = LOAD_REGISTER
    5 {
    gender.cObject = CASE
    gender.cObject {
    key = {field:gender}
    key.insertData = 1
    m = TEXT
    m.value = {register:lll_grender_m}
    m.insertData = 1
    f = TEXT
    f.value = {register:lll_grender_f}
    f.insertData = 1
    default = TEXT
    default.value =
    }
    }

    10 = COA
    10 {
    wrap = <td class="td-0">|</td>

    10 = TEXT
    10 {
    value = {register:gender} {field:first_name} {field:last_name}
    insertData = 1
    noTrimWrap = |<span class="person">|</span><br />|
    if.isTrue.field = last_name
    }

    20 = TEXT
    20 {
    field = company
    required = 1
    br = 1
    wrap = <div class="company"><em>|</em></div>
    }

    }

    20 = COA
    20 {
    wrap = <td class="td-last td-1">|</td>

    10 = TEXT
    10 {
    field = address
    required = 1
    br = 1
    wrap = <div class="streetAddress">|</div>
    }

    20 = TEXT
    20 {
    field = zip
    required = 1
    noTrimWrap = |<span class="postalCode">|</span> |
    }

    30 = TEXT
    30 {
    field = city
    required = 1
    noTrimWrap = |<span class="city">|</span> |
    }

    40 = TEXT
    40 {
    field = region
    required = 1
    noTrimWrap = |<span class="region">(|)</span><br />|
    outerWrap = |<br />
    outerWrap.if.isFalse.field = zip
    }

    50 = TEXT
    50 {
    field = phone
    required = 1
    dataWrap = <div class="phone"><span class="label">{register:lll_phone}. </span>|</div>
    }

    60 = TEXT
    60 {
    field = mobile
    required = 1
    dataWrap = <div class="mobile"><span class="label">{register:lll_mobile} </span>|</div>
    }

    70 = TEXT
    70 {
    field = fax
    required = 1
    dataWrap = <div class="fax"><span class="label">{register:lll_fax} </span>|</div>
    }

    80 = TEXT
    80 {
    field = email
    typolink.parameter.field = email
    required = 1
    dataWrap = <div class="email"><span class="label">{register:lll_email}: </span>|</div>
    }

    90 = TEXT
    90 {
    field = www
    typolink.parameter.field = www
    typolink.extTarget = _blank
    required = 1
    dataWrap = <div class="inet">|</div>
    }

    }

    wrap = <tr class="ttaddressAdrItem">|</tr>
    }
    wrap (
    <table class="contenttable ttaddressAdrList">
    <tbody>|</tbody>
    </table>
    )
    }
    }

    wrap = <div class="ttaddressLastnameListBox">|</div>
    }
    [/code]


  • 1
  • pstranghoener pstrangho...
    Die Macht
    0 x
    534 Beiträge
    26 Hilfreiche Beiträge
    27. 06. 2018, 08:44

    Hey Hoge,
    hast du schon eine Lösung gefunden? Ich pinne deine Frage mal mit an "wichtig" mit an.

    Grüße
    Philipp

  • 1