[TYPO3] Change Link File Name tt_news
Krystian Szymukowicz
t33k.RE.MO.VE at RE.MO.VE.prolabium.com
Tue Nov 21 08:22:24 CET 2006
Tom Sotil wrote:
> Hello dear TYPO3 Helpers and Friends,
>
> I was wondering if and where it is possible to change the filelink
> name-behaviour.
> Example: <a href=path/mysong.mp3>mysong.mp3</a> <- now
> new: <a href=path/mysong.mp3><img src=mp3.jpg /></a> <-new
>
> The reason for this is that I would like to make with the extension
> tt_news a list of available mp3 files (and video) for download. Instead
> of the filename appearing it would be nice to have a standard image for
> the mp3s and a standard image for the video.
> I thought of something like this:
>
> #####EXAMPLE CODE - NOT REAL JUST AN EXAMPLE!!!##########
> [GLOBALS: FILEXT==.mp3]
> linkwrap = <img src='mp3.jpg' />|
>
> [GLOBALS: FILEXT==.wmv]
> linkwrap = <img src='video.jpg' />|
>
> #############EXAMPLE END##################
>
> I'm also not so satisfied with the content-item 'filelinks' that it's
> showing only the filename. It would be nice to be able to enter any text
> for appearance. like <a href='mypdf.pdf'>This is my new essay</a>.
> Any ideas?
hello
you can consider using following extensions:
1. DAM - The Digital Asset Management (dam) is simply a tool for
organizing digital media assets for storage and retrieval. Metadata can
be used to search and organize image, text, audio, video (...) files.
2. tt_news DAM connector (news_dam_con) - extends tt_news by the
possibility to relate records from the extension dam ("Digital Asset
Management" by René Fritz) to tt_news articles.
then you can use following TS to configure tt_news
plugin.tt_news {
displaySingle {
damelements_stdWrap.wrap = <dl
class="news-single-files"><dt>Files:</dt>|</dl>
damelements_alternatingLayouts = 1
damelements_item_0_stdWrap.wrap = |</dd>
damelements_CObject = COA
damelements_CObject {
10=CASE
10.key.field = file_type
# settings for default type
10.default=COA
10.default {
10 = TEXT
10 {
value = <dd class="{field : file_type}" />
insertData = 1
}
20 = TEXT
20 {
field = title
crop = 200|...|
typolink.parameter = {field : file_path}{field : file_name}
typolink.parameter.insertData = 1
}
30 = TEXT
30 {
field = file_size
bytes = 1
bytes.labels = " b| kb| mb| gb"
noTrimWrap = | (|)|
}
40 >
50 >
}
}
}
}
This is just example. You can modify it for you needs. Note that image
for proper file types is made by css here
<dd class="{field : file_type}>
"title" for file is taken from DAM so you can describe your mp3 files
whatever you like. With DAM you can also make translation of file title.
If you want to change behaviour of content-item 'filelinks' you can
install and configure:
1. Filelinks DAM usage (dam_filelinks)
2. CSS styled Filelinks (css_filelinks)
Maybe there is more simple way to achieve what you want but this is the
one I use and it works well.
Good luck.
--
grtz
Krystian Szymukowicz
More information about the TYPO3-english
mailing list