getkirby/kirby — pull request #127 by Denney (2014-11-13 16:11:47+00:00)
Title: Add support for computed content fields.

While we have the ability to sort pages based on a custom date format, I noticed that if you want to use the panel, you're limited to either a date format or a time format, not a combination. This is due no "datetime" field in the panel. I considered creating a custom field for that purpose but I came back to an idea I had when using Kirby v1, `computed fields`. I've had a few instances where I'd like to have the value of a field computed somehow rather than just set in the content file.

This pull request contains the ability to create a custom computed field function for each template. Inside that function you can do what you need to do to get the value you want for the field. I've included an example below. You don't have to use it but I figured it might help someone else.

Create a `site\computed\article.php` file. Put the following in it:

```php