Contao "meta.txt" syntax - mystery solved!

Posted by Howard Richardson (comments: 1)

Contao can use a file called meta.txt to set the order and metadata for downloadable files or gallery images, but nowhere is it specified how you should formulate this file. A Google search for "Contao meta.txt syntax" will lead you in fruitless circles. I don't recommend you try it.

After much searching, I eventually found an explanation in a German book, so here translated are the instructions for making your own meta.txt file....

General Format

Filename = Alt text | Link | Description
Filename = Alt text | Link | Description
...etc

Files are listed in the order you want them to appear. Link and description are optional, so you could just have:

google.jpg = Google | http://www.google.com

Or without a link:

google.jpg = Google || Google-Logo

If you want a line-break, you can set that using double colons...

google.jpg = Google :: The best search engine || Google-Logo

 

For downloadable files you won't need the link, so this is probably enough:

some_document.doc = My Word document

Go back

Add a comment

Comment by Zod |

Second time i finish in your website today, thank you for your help. I solved this annoying meta syntax and the format date both.
Cheer!