Closed mkoosej closed 10 years ago
The previous logic for whether a Page was rendered in the menu was whether the label field was empty or not. With the 1.1 update this has been moved into a separate explicit property on Page called display
https://github.com/symfony-cmf/SimpleCmsBundle/blob/master/Doctrine/Phpcr/Page.php#L103
$page = $documentManager->find($pageClass, '/cms/simple/my/page');
$page->setDisplay(false);
$documentManager->persist($page);
$documentManager->flush();
You will need to write a 1 time script that sets this display value to false for any pages that have no labels to achieve the previous behavior.
Thanks for the clarification. I think updating the Admin class would be great. I can merge my own code after adding this.
@mkoosej yes we have an open issue for allowing management of these fields in the SimpleCmsBundle PageAdmin class https://github.com/symfony-cmf/SimpleCmsBundle/issues/114
Would you mind submitting a PR?
Sure. I'm working on adding those options today.
After doing a composer update , the items that doesn't have labels and shouldn't be in the menu showed up. I'm using knp_menu_render twig function to render a branch of my tree that contains simpleCms nodes.
my composer.json: { ... "symfony/symfony": "2.3.", "symfony-cmf/symfony-cmf": "1.1.", "symfony-cmf/simple-cms-bundle": "1.1.", "knplabs/knp-menu-bundle": "1.1." ... }
Do you have any clue why this node passed down to renderer?