tt_news und tx_dam via TypoScript verbinden [Gelöst]

  • lennart lennart
    TYPO3-Anwärter
    0 x
    6 Beiträge
    0 Hilfreiche Beiträge
    23. 02. 2011, 21:24

    Hallo,
    ich habe ein Problem. Folgender code functioniert bei mir, wenn ich ihn im Template setze:

    1. lib.teaserGal < plugin.tt_news
    2. lib.teaserGal {
    3. templateFile = fileadmin/template/tt_news/template_galleries.html
    4. code >
    5. code = LIST
    6. pid_list >
    7. pid_list.insertData = 1
    8. pid_list = {page:uid}
    9. singlePid = 20
    10. recursive = 3
    11. limit = 200
    12. alternatingLayouts = 2
    13. categoryMode = 2
    14. categorySelection = 20
    15.  
    16. genericmarkers {
    17. title1 = TEXT
    18. title1.field = tx_lhsixxbase_ah1
    19.  
    20. title2 = TEXT
    21. title2.field = tx_lhsixxbase_ah2
    22.  
    23. gallery = CONTENT
    24. gallery {
    25. table = tt_news
    26. select.selectFields = tx_dam.file_path, tx_dam.file_name, tx_dam.uid tx_damUid, tx_dam.title, tx_dam.alt_text, tx_dam.caption, tx_dam.tx_lhsixxbase_description
    27. select.join = tx_dam_mm_ref ON (tt_news.uid = tx_dam_mm_ref.uid_foreign AND tx_dam_mm_ref.tablenames = 'tt_news' AND tx_dam_mm_ref.ident = 'tx_dam2ttnews_bilder') JOIN tx_dam ON (tx_dam.uid = tx_dam_mm_ref.uid_local AND tx_dam.deleted = 0 AND tx_dam.hidden = 0) JOIN tx_dam_mm_cat ON (tx_dam_mm_cat.uid_local = tx_dam.uid AND tx_dam_mm_cat.uid_foreign = 49)
    28. select.where = tt_news.deleted = 0 AND tt_news.hidden = 0
    29. select.andWhere.dataWrap = tt_news.uid = {field:uid}
    30. select.orderBy = tx_dam_mm_ref.sorting_foreign ASC
    31. select.max = 4
    32.  
    33. renderObj = COA
    34. renderObj {
    35. 10 = IMAGE
    36. 10.file.import.dataWrap = {field:file_path}{field:file_name}
    37. 10.file.width = 46c
    38. 10.file.height = 75c
    39. 10.titleText.dataWrap = {field:title}
    40. 10.altText.dataWrap = {field:alt_text}
    41. }
    42. }
    43. }
    44. }
    45. page.100.marks.COL_LEFT.120 < lib.teaserGal

    Wenn ich das gleiche jetzt aber auf das tt_news plugin element umschreibe, also unter "TypoScript für dieses Inhaltselement (plugin.tt_news.[your TS])" volgendes einfüge:

    1. genericmarkers {
    2. title1 = TEXT
    3. title1.field = tx_lhsixxbase_ah1
    4.  
    5. title2 = TEXT
    6. title2.field = tx_lhsixxbase_ah2
    7.  
    8. gallery = CONTENT
    9. gallery {
    10. table = tt_news
    11. select.selectFields = tx_dam.file_path, tx_dam.file_name, tx_dam.uid tx_damUid, tx_dam.title, tx_dam.alt_text, tx_dam.caption, tx_dam.tx_lhsixxbase_description
    12. select.join = tx_dam_mm_ref ON (tt_news.uid = tx_dam_mm_ref.uid_foreign AND tx_dam_mm_ref.tablenames = 'tt_news' AND tx_dam_mm_ref.ident = 'tx_dam2ttnews_bilder') JOIN tx_dam ON (tx_dam.uid = tx_dam_mm_ref.uid_local AND tx_dam.deleted = 0 AND tx_dam.hidden = 0) JOIN tx_dam_mm_cat ON (tx_dam_mm_cat.uid_local = tx_dam.uid AND tx_dam_mm_cat.uid_foreign = 49)
    13. select.where = tt_news.deleted = 0 AND tt_news.hidden = 0
    14. select.andWhere.dataWrap = tt_news.uid = {field:uid}
    15. select.orderBy = tx_dam_mm_ref.sorting_foreign ASC
    16. select.max = 4
    17.  
    18. renderObj = COA
    19. renderObj {
    20. 10 = IMAGE
    21. 10.file.import.dataWrap = {field:file_path}{field:file_name}
    22. 10.file.width = 46c
    23. 10.file.height = 75c
    24. 10.titleText.dataWrap = {field:title}
    25. 10.altText.dataWrap = {field:alt_text}
    26. }
    27. }
    28. }

    kommen nur die Überschriften, nicht aber die Bilder aus dem CONTENT element.
    Hab ich nur irgend etwas kleines übersehen, oder geht hier kein CONTENT element?

    für jede hilfe dankbar
    Lennart


  • 1
  • lennart lennart
    TYPO3-Anwärter
    0 x
    6 Beiträge
    0 Hilfreiche Beiträge
    24. 02. 2011, 21:57

    So, nach langem hin und her, Problem gelößt
    select.pidInList = this war schuld bzw dessen Abwesenheit auf die richtige id. Hab das ganze auch noch gedreht, so das das primäre query jetzt tx_dam ist. Sie dann wie folgt aus:

    1. lib.teaserGal < plugin.tt_news
    2. lib.teaserGal {
    3. templateFile = fileadmin/template/tt_news/template_galleries.html
    4. code >
    5. code = LIST
    6. pid_list >
    7. pid_list.insertData = 1
    8. pid_list = {page:uid}
    9. singlePid = 20
    10. recursive = 6
    11. limit = 200
    12. alternatingLayouts = 2
    13. categoryMode = 2
    14. categorySelection = 20
    15.  
    16. genericmarkers {
    17. title1 = TEXT
    18. title1.field = tx_lhsixxbase_ah1
    19.  
    20. title2 = TEXT
    21. title2.field = tx_lhsixxbase_ah2
    22.  
    23. gallery = CONTENT
    24. gallery {
    25.  
    26. table = tx_dam
    27. select.selectFields = tx_dam.file_path, tx_dam.file_name, tx_dam.uid, tx_dam.title, tx_dam.alt_text, tx_dam.caption, tx_dam.tx_lhsixxbase_description
    28. select.join = tx_dam_mm_cat ON (tx_dam_mm_cat.uid_local = tx_dam.uid AND tx_dam_mm_cat.uid_foreign = 49) JOIN tx_dam_mm_ref ON (tx_dam.uid = tx_dam_mm_ref.uid_local AND tx_dam_mm_ref.tablenames = 'tt_news' AND tx_dam_mm_ref.ident = 'tx_dam2ttnews_bilder') JOIN tt_news ON (tt_news.uid = tx_dam_mm_ref.uid_foreign AND tt_news.deleted = 0 AND tt_news.hidden = 0)
    29. select.andWhere.dataWrap = tt_news.uid = {field:uid}
    30. select.orderBy = tx_dam_mm_ref.sorting_foreign ASC
    31. select.max = 4
    32. select.pidInList = 19
    33.  
    34. renderObj = COA
    35. renderObj {
    36. 10 = IMAGE
    37. 10.file.import.dataWrap = {field:file_path}{field:file_name}
    38. 10.file.width = 46c
    39. 10.file.height = 75c
    40. 10.titleText.dataWrap = {field:title}
    41. 10.altText.dataWrap = {field:alt_text}
    42. }
    43. }
    44. }
    45. }
    46. page.100.marks.COL_LEFT.120 < lib.teaserGal

    und den genericmarkers teil kann man jetzt auch unter "TypoScript für dieses Inhaltselement (plugin.tt_news.[your TS])" verwenden, also

    1. genericmarkers {
    2. title1 = TEXT
    3. title1.field = tx_lhsixxbase_ah1
    4.  
    5. title2 = TEXT
    6. title2.field = tx_lhsixxbase_ah2
    7.  
    8. gallery = CONTENT
    9. gallery {
    10.  
    11. table = tx_dam
    12. select.selectFields = tx_dam.file_path, tx_dam.file_name, tx_dam.uid, tx_dam.title, tx_dam.alt_text, tx_dam.caption, tx_dam.tx_lhsixxbase_description
    13. select.join = tx_dam_mm_cat ON (tx_dam_mm_cat.uid_local = tx_dam.uid AND tx_dam_mm_cat.uid_foreign = 49) JOIN tx_dam_mm_ref ON (tx_dam.uid = tx_dam_mm_ref.uid_local AND tx_dam_mm_ref.tablenames = 'tt_news' AND tx_dam_mm_ref.ident = 'tx_dam2ttnews_bilder') JOIN tt_news ON (tt_news.uid = tx_dam_mm_ref.uid_foreign AND tt_news.deleted = 0 AND tt_news.hidden = 0)
    14. select.andWhere.dataWrap = tt_news.uid = {field:uid}
    15. select.orderBy = tx_dam_mm_ref.sorting_foreign ASC
    16. select.max = 4
    17. select.pidInList = 19
    18.  
    19. renderObj = COA
    20. renderObj {
    21. 10 = IMAGE
    22. 10.file.import.dataWrap = {field:file_path}{field:file_name}
    23. 10.file.width = 46c
    24. 10.file.height = 75c
    25. 10.titleText.dataWrap = {field:title}
    26. 10.altText.dataWrap = {field:alt_text}
    27. }
    28. }
    29. }

    vielleicht hilft es ja wem den Tag den ich verloren habe zu sparen 8-)

    bis dann
    lennart

  • lennart lennart
    TYPO3-Anwärter
    0 x
    6 Beiträge
    0 Hilfreiche Beiträge
    24. 02. 2011, 22:00

    ach ja, 19 ist die id des Ordners, wo die DAM Inhalte drinnen liegen. Rest sollte auch so verständlich sein

  • 1