[TYPO3-dam] how to display DAM images via TS CONTENT object
Erich Specht
erich at erichspecht.com
Wed Jul 31 18:02:57 CEST 2013
I think I found the solution in case anyone else is wondering the same
thing.
5 = IMAGE
5 {
wrap=|
# show it only if inserted
#stdWrap.if.isTrue.field=image
#file.import=uploads/pics/
#file.import.field=image
file.import.stdWrap.listNum = 0
file.width=172
file.height=100
file.import.cObject = USER
file.import.cObject {
userFunc=tx_dam_tsfe->fetchFileList
refField=tx_damnews_dam_images
refTable=tt_news
additional.fileList.field=image
additional.filePath=uploads/pics/
}
stdWrap.typolink {
parameter = {$site_single_pid} # PAGE_ID_OF_SINGLE_VIEW
# create an cacheable link, that does not depend on cooluri
or realurl.
useCacheHash = 1
# add the additional params
additionalParams.wrap = &tx_ttnews[tt_news]=|
# data expects special commands
# "&my_extra_param=something" cannot work on .data
additionalParams.data = field:uid
}
}
-----Original Message-----
From: typo3-project-dam-bounces at lists.typo3.org
[mailto:typo3-project-dam-bounces at lists.typo3.org] On Behalf Of Erich Specht
Sent: Wednesday, July 31, 2013 9:56 AM
To: typo3-project-dam at lists.typo3.org
Subject: [TYPO3-dam] how to display DAM images via TS CONTENT object
I'm rendering tt_news content via the Typoscript CONTENT object. I'm able
to display the associated images uploaded into the tt_news plugin's Images
area with the code below. Does anyone know how I can modify this to display
the images in the DAM Images section instead?
temp.top_right_content= COA
temp.top_right_content {
wrap = <div class="news-list-container">|</div>
10 = CONTENT
10.table = tt_news
10.select.selectFields = image, tt_news.title, tt_news.short, tt_news.uid
10.select.pidInList = {$pid_list_home_right} # uid of the sysfolder where
news records are stored
10.select.recursive = 250 #allow content in subfolders
10.select.max= 20
10.select.begin = 6
10.select.where = uid_foreign IN ( {$categorySelection_home_right} )
10.select.where.insertData=1 #tells it to replace constants or registers
10.select.andWhere = image > ''
10.select.join = tt_news_cat_mm ON tt_news.uid = tt_news_cat_mm.uid_local
10.select.orderBy = datetime desc
#render the retrieved data
10.renderObj = COA
10.renderObj {
wrap = <div class="news-list-item">|</div>
5 = IMAGE
5 {
wrap=|
# show it only if inserted
stdWrap.if.isTrue.field=image
file.import=uploads/pics/
file.import.field=image
file.import.stdWrap.listNum = 0
file.width=172
file.height=100
stdWrap.typolink {
parameter = {$site_single_pid} # PAGE_ID_OF_SINGLE_VIEW
# create an cacheable link, that does not
depend on cooluri or realurl.
useCacheHash = 1
# add the additional params
additionalParams.wrap =
&tx_ttnews[tt_news]=|&myextraparam=something
additionalParams.data = field:uid
}
}
#title
10 = TEXT
10.field = title
10.wrap = <h1 class="list_news_title">|</h1>
10.typolink {
parameter = {$site_single_pid} # PAGE_ID_OF_SINGLE_VIEW
# create an cacheable link, that does not depend on cooluri
or realurl.
useCacheHash = 1
# add the additional params
additionalParams.wrap = &tx_ttnews[tt_news]=|
# data expects special commands
# "&my_extra_param=something" cannot work on .data
additionalParams.data = field:uid
}
}
}
#end temp.top_right_content
lib.field_top_right_content.10 >
lib.field_top_right_content.10 < temp.top_right_content
_______________________________________________
TYPO3-project-dam mailing list
TYPO3-project-dam at lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-dam
More information about the TYPO3-project-dam
mailing list