Load content from html file
dmanners opened this issue · comments
We have been using this module in one of our projects and have found it fairly useful to be able to load the content from a file.
For example, we have a module setup that will have our setup files in it and then we have a content service that will do a lookup for a matching file.
$this->block->save([
'identifier' => 'footer_top',
'title' => 'Footer Top',
'content' => $this->contentService->getBlockContent('footer_top'),
'store_id' => (int) $store->getId()
]);
Here the folder structure is:
Setup: Module/Setup/Patch/Data/CreateFooterBlockPatch.php
Content: Module/Setup/Block/footer_top.html
Would this be something you would be interested in seeing contributed back to the module?
Hi @dmanners!
I really, really like the concept, but this gave me a whole other idea entirely that would be better suited under a new module. I’ll DM you in a bit.