Custom Fields

Permalink
I am new to C5 having been using WordPress for the past 3 years I thought it about time to give something else a go!

Anyway my question is:
In WP to create a video player that is content managed I would hard code Flowplayer into a template and then in WP I would create a Custom Field so that the client could upload a video and then enter a URL of the video location.

How would I do the same thing within C5?

Many thanks,
Rob

 
site replied on at Permalink Reply
site
Have you tried creating a Flowplayer template for the file block? This would allow a user to add a file block to the desired page and select an uploaded video and then change the custom template of the file block to the flowplayer template to display the video with Flowplayer.

Maybe it would go something like this:
--Create directory /blocks/file/templates
--Copy /concrete/blocks/file/view.php to /blocks/file/templates/flowplayer.php
--Edit /blocks/file/templates/flowplayer.php to include the Flowplayer hard code and the link to the file that the Flowplayer hard code may need would possibly be something like
$f->getRelativePath();

For further reference see Concrete5 documentation on the File object or /concrete/models/file.php.
madebyape replied on at Permalink Reply
thanks for takling the time to reply. I will give that a go and let you know how I get on.
LucasAnderson replied on at Permalink Reply
LucasAnderson
There are included video blocks on a basic concrete5 install and many add-ons in the Marketplace for adding video. These won't require you to do any custom programming.

http://www.concrete5.org/marketplace/addons/-/view/?submit_search=1...