Forum
How to output a path to a video file?
Hi, I'm trying to output the path to a video file that's been uploaded to Perch. Currently however, nothing is being output at all. Can anyone help?
Here's the template code I'm using:
<perch:content id="hero_video" type="file" file-type="video" bucket="Video" label="Hero video">
The CMS side of things seems to work fine – I've uploaded the video, and I'm able to select it in the Hero video CMS field. But when I save & inspect the page, nothing's being output. I'm sure I'm missing something obvious...
And here's my diagnostics report:
Perch: 2.8.31, PHP: 5.6.14-1+deb.sury.org~trusty+1, MySQL: mysqlnd 5.0.11-dev - 20120503 - $Id: 3c688b6bbc30d36af3ac34fdd4b7b5b787fe5555 $, with PDO
Server OS: Linux, apache2handler
Installed apps: content (2.8.31), assets (2.8.31), categories (2.8.31), perch_forms (1.8.3)
App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_forms' );
PERCH_LOGINPATH: /perch
PERCH_PATH: /var/www/public/perch
PERCH_CORE: /var/www/public/perch/core
PERCH_RESFILEPATH: /var/www/public/perch/resources
Image manipulation: GD Imagick
PHP limits: Max upload 2M, Max POST 8M, Memory: 128M, Total max file upload: 2M
F1: 2edba60ed1f613d6dd804feb202456a2
Resource folder writeable: Yes
HTTP_HOST: 192.168.33.10
DOCUMENT_ROOT: /var/www/public
REQUEST_URI: /perch/core/settings/diagnostics/
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
Hi Will,
I don't think
file-type
is a thing. Also you need to close the end of the tag. Try this:Hi Mike,
thank you - closing the tag did the trick. I knew it was something simple...
As for
file-type
, I got that from another post here on the forums. You're right, it doesn't seem to do anything.