Closed phiamo closed 11 years ago
@phiamo did you check if it works if you add something like
Symfony\Cmf\Bundle\BlockBundle\Doctrine\Phpcr\SimpleBlock:
valid_children: []
i think #180 should have made possible what you try to do, but maybe there is an issue. @benglass does this tell you anything?
perfect, that did the trick
@benglass: then i think part of what you intended to do in #180 did not happen. can you make sure that everything that is found in a valid child list but has no own entry is treated as if it has its on entry with no valid children?
@dbu i think this is how its supposed to work. If you dont provide a mapping for the node it should not appear in the list. This makes it possible to have it as a top level node and not appear if you dont want it to appear but to be able to appear as a child node. It also makes it possible to have a child node appear without the ability to create/delete it but perhaps this is something that should be determined by sonata admin permissions and not this mapping. This is not an area of behavior that has a clear-cut right/wrong answer as to how it should behave (in my opinion) but requiring that you provide a mapping for a doc if you want it to have a context menu makes sense to me. Im open for disagreement.
This request potentially indicates a need to clarify the docs with regard to the purpose of the document_tree config?
+1 for not changing the existing behaviour at this point but improve the doc.
the sonata phpcr doc has kind of fallen between the tables: there is a bit in the cmf docs and a bit in the sonata repo. there is an issue in the doc issue tracker: https://github.com/symfony-cmf/symfony-cmf-docs/issues/285 . i will for now add a note there. if you would be interested to build that documentation, that would be a very welcome contribution indeed.
using this config and creating a SimpleBlock does show it in the tree but get rel: undefined, and then has no actions ReferenceBlock works well ....