Skip to content

Instantly share code, notes, and snippets.

@boutell
Created March 22, 2018 15:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save boutell/8ea95b723b253cc697607a1cc51dd5fb to your computer and use it in GitHub Desktop.
Save boutell/8ea95b723b253cc697607a1cc51dd5fb to your computer and use it in GitHub Desktop.
Apostrophe CMS addColumns example
[
{
name: 'title',
label: 'Title'
},
{
name: 'updatedAt',
label: 'Last Updated',
partial: function(value) {
if (!value) {
// Don't crash if updatedAt is missing, for instance due to a dodgy import process
return '';
}
return self.partial('manageUpdatedAt.html', { value: value });
}
},
{
name: 'published',
label: 'Published',
partial: function(value) {
return self.partial('managePublished', { value: value });
}
}
];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment