Search code examples
phptypo3flexslider

Store images in a folder for FlexSlider extension in TYPO3 6


This question might be very basic, I'm an amateur in TYPO3.

I needed an image slider for my website and found this extension FlexSlider. I want this extensions to take all the image records from a folder, instead of manually creating a record for each image.

This is what I did so far

I have my set of images in fileadmin/templates/images folder. I then created File Collection under System Records and stored the fileadmin/templates/images into this.

I created a Backend Layout for a page slider page and inserted the flexSlider extension to it.

In flexSlider/Configuration/TypoScript/setup.txt is added this:

persistence.storagePid = 81

81 being the pageId of the File Collection Record Folder .

Of course, this is not the final step to this process. Do I need to write a PHP Code or something to insert the images from fileadmin folder to the System record folder? I'm stuck here.


Solution

  • This won't work. The named flexslider extension has its own db table and expects records in there to be rendered. The storagePid option is just the place where those records are stored, if not on the page where the extension is inserted on.

    A record consists of more than just an image. You can specify an alt-text, title and subtitle of the slide and so on. Assuming that your slides won't change every 5 minutes, it is worth the (little) additional effort of creating those records in comparison to find another extension/solution for your plan.

    The extension has (for instance) also the advantage of being responsive out of the box, which you may take into account for decision as well. I use it quite often and really like it.