Question

I want to create a custom PHPCR document for a set of pages that I have in my website. I extended the SimpleCms/Page class and I created my object and persisted it using the document manager. I can see the content using node:dump command and in the database But I can't see it in the treebrowser.

So I want to know what are the other things I should provide to let the treebrowser display my custom branch.

Was it helpful?

Solution

You need to declare that your document may show up in the tree.

document_tree:
    Acme\DemoBundle\Document\YourPage:
        valid_children:
            - Symfony\Cmf\Bundle\SimpleCmsBundle\Doctrine\Phpcr\Page
    Symfony\Cmf\Bundle\SimpleCmsBundle\Doctrine\Phpcr\Page:
        valid_children:
            - Acme\DemoBundle\Document\YourPage

More information is in the sonata doc.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top