Created
March 22, 2018 15:50
-
-
Save boutell/8ea95b723b253cc697607a1cc51dd5fb to your computer and use it in GitHub Desktop.
Apostrophe CMS addColumns example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
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