Adding a property to the post context object


#1

I’d like to do add a custom property to the post object.

I tried editing the schema (server/data/schema/schema.js) and adding a property to the posts object there e.g.

my_prop: {type: 'bool', nullable: true, defaultTo: false},

I don’t see this property present when I log the posts object in terminal. (I did restart my server after making the change)


Adding Category to Posts - Running a Migration
Add to the post context object
#2

This didn’t get a reply because it is not clear what you’re trying to achieve.


#3

I think you should not edit the ghost core files to avoid any kind of error


#4

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.