We are transitioning over to a new forum platform. Please post new issues there. Existing threads will be dealt with here unless you choose to move them over. Visit the new forum

Forum

Thread tagged as: Question, Forum, Field-Types

How can I upload video's in a (image) slider?

Hello,

Is there a way to upload video's in a image slider (and give them a max height)? I don't find a solution with this basic set-up. This is the testpage: http://studiowolf.be/test/autolusso/autolusso-exclusive-cars.php Many thanks in advance!

<perch:repeater id="images" label="Images">
<li><img src="<perch:content type="image" id="image" label="Image" height="400" crop="true" />" alt="<perch:content type="text" id="alt" label="Description" />" /></li>
</perch:repeater>
Perch: 2.8.34, PHP: 7.0.13, MySQL: mysqlnd 5.0.12-dev - 20150407 - $Id: 241ae00989d1995ffcbbf63d579943635faf9972 $, with PDO Server OS: Linux, cgi-fcgi Installed apps: content (2.8.34), assets (2.8.34), categories (2.8.34) App runtimes: <?php $apps_list = array( 'content', 'categories', ); PERCH_LOGINPATH: /test/autolusso/perch PERCH_PATH: /home/studiowolf/domains/studiowolf.be/public_html/test/autolusso/perch PERCH_CORE: /home/studiowolf/domains/studiowolf.be/public_html/test/autolusso/perch/core PERCH_RESFILEPATH: /home/studiowolf/domains/studiowolf.be/public_html/test/autolusso/perch/resources Image manipulation: GD PHP limits: Max upload 64M, Max POST 64M, Memory: 128M, Total max file upload: 64M F1: 6a33f95eca3667f9e0c39bf5ca2980fe Resource folder writeable: Yes SCRIPT_NAME: /test/autolusso/perch/core/settings/diagnostics/index.php REQUEST_URI: /test/autolusso/perch/core/settings/diagnostics/ DOCUMENT_ROOT: /home/studiowolf/domains/studiowolf.be/public_html HTTP_HOST: studiowolf.be
Frederic Desauw

Frederic Desauw 0 points

  • 2 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

A video is just a file as far as Perch is concerned - so you should be able to use type="file".

<video src="<perch:content id="video" type="file" label="Video file" />" height="400" controls>
</video>

Yes, but does there exist a type so I can select or a video or an image for the slider?

Drew McLellan

Drew McLellan 2638 points
Perch Support

<perch:if exists="video">
    <video src="<perch:content id="video" type="file" label="Video file" />" height="400" controls> </video>
<perch:else />
   <img src="<perch:content id="image" type="image" label="Image" />" />
</perch:if>

Works perfect! Thx!