Search code examples
videobolt-cmsfilelist

Video and file list displaying unwanted attributes in Bolt cms


I have uploaded a video and a file list in a page. But instead of the video and the file list it shows the attributes or records related to the file.

enter image description here


Solution

  • In the record.twig template of the default theme the fields revert to a dump of all attributes when there is an unknown field.

    You will have to change the template yourself to make them return usable html.

    For example if your video field is a file upload field called video you could use the following code to link to the video:

    {% if record.video is not empty %}
    <video src="{{ paths.files }}{{ record.video }}"></video>
    {% elseif %}
    <span>No video</span>
    {% endif %}
    

    You can see more about content in templates in the docs at https://docs.bolt.cm/building-templates#template-tags