Die TYPO3 Mailingliste - nicht fragen: lesen!
This is a discussion on [TYPO3] Extracting all images from media field within the typo3-english@lists.netfielders.de forums, part of the TYPO3-Mailinglists: ENGLISH category; Hi all, On the site I am working on, users can add images and the media field and they all ...
|
|||||||
| Registrieren | Hilfe | Benutzerliste | Kalender | Suchen | Heutige Beiträge | Alle Foren als gelesen markieren |
|
#1
|
|||
|
|||
|
Hi all,
On the site I am working on, users can add images and the media field and they all should be displayed somewhere on the page, whatever the number of images. The following TS obviously display only the first image: lib.cw_rightcolumn = COA lib.cw_rightcolumn { 10 = IMAGE 10.file { import = uploads/media/ import.data = levelfield : -1, media , slide import.listNum = 0 } } If I remove importListNum = 0, it simply display nothing. Is there a way to have a kind of loop on all images? Thanks in advance for any help. François Suter Directeur technique ------------------------------------------------------------------------ ------------------------------------------------------------- Cobweb Development Sàrl www.cobweb.ch ------------------------------------------------------------------------ ------------------------------------------------------------- _______________________________________________ TYPO3-english mailing list TYPO3-english (AT) lists (DOT) netfielders.de http://lists.netfielders.de/cgi-bin/.../typo3-english |
|
#2
|
|||
|
|||
|
you need to get the whole filed and use split and ',' then render as 1=coa
Do a search in the lists as I asked a similar question a while back and Peter Klien (I think it was Peter) gave a very helpful answer. hth Francois Suter wrote: > Hi all, > > On the site I am working on, users can add images and the media field > and they all should be displayed somewhere on the page, whatever the > number of images. > > The following TS obviously display only the first image: > > lib.cw_rightcolumn = COA > lib.cw_rightcolumn { > 10 = IMAGE > 10.file { > import = uploads/media/ > import.data = levelfield : -1, media , slide > import.listNum = 0 > } > } > > If I remove importListNum = 0, it simply display nothing. Is there a way > to have a kind of loop on all images? > > Thanks in advance for any help. > > François Suter > Directeur technique > ------------------------------------------------------------------------------------------------------------------------------------- > > Cobweb Development Sàrl > www.cobweb.ch > ------------------------------------------------------------------------------------------------------------------------------------- > > > _______________________________________________ TYPO3-english mailing list TYPO3-english (AT) lists (DOT) netfielders.de http://lists.netfielders.de/cgi-bin/.../typo3-english |
|
#3
|
|||
|
|||
|
Here Francois,
This is from Peters reply to me on 17:43 21/12/2006 -- cut -- lib.images = COA lib.images { 10 = TEXT 10.data = page:media 10.split { token = , cObjNum = 1 1 { 10 = IMAGE 10.file.import.current = 1 10.file.import = uploads/media/ } } } -- cut -- The above code will show all the images attached to the media field of the page.. -- Tyler Kraft wrote: > you need to get the whole filed and use split and ',' then render as 1=coa > > Do a search in the lists as I asked a similar question a while back and > Peter Klien (I think it was Peter) gave a very helpful answer. > > hth > > > > Francois Suter wrote: >> Hi all, >> >> On the site I am working on, users can add images and the media field >> and they all should be displayed somewhere on the page, whatever the >> number of images. >> >> The following TS obviously display only the first image: >> >> lib.cw_rightcolumn = COA >> lib.cw_rightcolumn { >> 10 = IMAGE >> 10.file { >> import = uploads/media/ >> import.data = levelfield : -1, media , slide >> import.listNum = 0 >> } >> } >> >> If I remove importListNum = 0, it simply display nothing. Is there a >> way to have a kind of loop on all images? >> >> Thanks in advance for any help. >> >> François Suter >> Directeur technique >> ------------------------------------------------------------------------------------------------------------------------------------- >> >> Cobweb Development Sàrl >> www.cobweb.ch >> ------------------------------------------------------------------------------------------------------------------------------------- >> >> >> _______________________________________________ TYPO3-english mailing list TYPO3-english (AT) lists (DOT) netfielders.de http://lists.netfielders.de/cgi-bin/.../typo3-english |
|
#4
|
|||
|
|||
|
Hi,
On 5/9/07, Tyler Kraft <headhunterxiii (AT) yahoo (DOT) ca> wrote: > you need to get the whole filed and use split and ',' then render as 1=coa > > Do a search in the lists as I asked a similar question a while back and > Peter Klien (I think it was Peter) gave a very helpful answer. Two relevant snippets come to mind: http://www.typo3wizard.com/en/snippe...dia-field.html http://www.typo3apprentice.com/typos.../split-sample/ (The latter does not use the media field, but does show how .split can be used to 'loop' through a comma-separated list [such as the contents of the media field...]) -- Christopher Torgalson http://www.typo3apprentice.com/ _______________________________________________ TYPO3-english mailing list TYPO3-english (AT) lists (DOT) netfielders.de http://lists.netfielders.de/cgi-bin/.../typo3-english |
|
#5
|
|||
|
|||
|
Hi Tyler,
> lib.images = COA > lib.images { > 10 = TEXT > 10.data = page:media > 10.split { > token = , > cObjNum = 1 > 1 { > 10 = IMAGE > 10.file.import.current = 1 > 10.file.import = uploads/media/ > } > } > } I nearly got there alone in the meantime. I just forgot the "file." property (again!) in the IMAGE object but my code was otherwise correct. Am I one proud bastard Earned some additional TS stripes tonight ![]() Thanks a lot for your help. Christopher, thanks to you too. Cheers François Suter Directeur technique ------------------------------------------------------------------------ ------------------------------------------------------------- Cobweb Development Sàrl www.cobweb.ch ------------------------------------------------------------------------ ------------------------------------------------------------- _______________________________________________ TYPO3-english mailing list TYPO3-english (AT) lists (DOT) netfielders.de http://lists.netfielders.de/cgi-bin/.../typo3-english |
| Themen-Optionen | Thema durchsuchen |
| Ansicht | Thema bewerten |
|
|
|
||||
| Thema | Autor | Forum | Antworten | Letzter Beitrag |
| [TYPO3-german] DAM - Media Ordner mit allen Kategorien "aus Versehen" gelöscht | Frank Birzle | typo3-german@lists.netfielders.de | 4 | 02.03.2007 14:28 |
| [TYPO3] images: more than 8 column? | Matyi Gábor | typo3-english@lists.netfielders.de | 0 | 21.02.2007 20:41 |
| [TYPO3] alt text on images | Camilla | typo3-english@lists.netfielders.de | 0 | 24.01.2007 15:06 |
| [TYPO3] which media player? | Bing Du | typo3-english@lists.netfielders.de | 2 | 19.12.2006 15:27 |
| [TYPO3] integrate with external media server | Bing Du | typo3-english@lists.netfielders.de | 0 | 06.12.2006 23:36 |