I migrated to omeka-s v4.0.4 recently.
I had a very long, ugly and convenient custom version of view/omeka/site/item/show.phtml in my theme.
In that file I wrote php functions and php rendering lines to show up some (filtered) data from some (filtered) linked items. (see issue1966).
I also created some
viewFile for displaying, in an item page, the content of another item.
Now I should port this to block layout
I read the doc for dev and I’m lost.
I think I need to create a new block (or more).
This doc page “module/Page blocks” is a basic requirement only.
btw why is this page sorted in the “module” section, and not “theme” section?
→ should I
- first create a module that does the job (gathering and filtering),
- then create a theme which call this “job” to be displayed?
Indeed the new block definition (extending the
AbstractBlockLayout) seems to be located in src/Site/BlockLayout directory. This directory not rewritable by the theme, is it?
In the doc, elsewhere, I also found the section Updating An Existing Custom Show Page to Use Resource Page Blocks. But no new block is displayed, only existing standard blocks are re-used.
What are the files I have to create, and what should they contain?
I’m sorry I’m really into php and MVC architecture (but react ).
I can’t find any example of a definition of a new block used to show something new in e.g. item/show.phtml
An example is really what I need.
Is it a very special case?
Is the doc clear about this and I didn’t succeed in understanding it?
thank you for your help.