In Magento 2 I've added a custom attribute to CMS pages (another post on here got me part of the way).
UpgradeSchema.php to create the new attribute and I can see my new attribute/column in the
cms_page table. I also created an Observer to add the field to CMS pages in Admin, and the field works (changes are saved) in the
Admin > Content > Pages > Content tab.
This is where I've got stuck. I've got this far by piecing together bits and pieces of information I could find, but I can't find anything on how to actually 'get' this data and output it on the frontend.
At the moment I have an (empty) Helper, and a
phtml template which is ready to output the value in. But I don't know what to put in the Helper, or even if that is the right thing to do (should I be extending the Page or Block class from example)?
As a lowly frontend developer trying to muddle his way through a Magento world, I could do with a little nudge in the right direction. Thanks.