Skip to content
This repository was archived by the owner on Sep 16, 2021. It is now read-only.

Commit 2cc17ce

Browse files
committed
note about versions for cms cookbook. #360
1 parent 8864c15 commit 2cc17ce

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

cookbook/create_basic_cms_auto_routing.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,10 @@ Create a page for your CMS::
378378
{
379379
public function load(ObjectManager $dm)
380380
{
381+
// When using PHPCR-ODM 1.0, we need to create the root path
382+
// manually. Not needed with PHPCR-ODM 1.1
381383
NodeHelper::createPath($dm->getPhpcrSession(), '/cms/pages');
384+
382385
$parent = $dm->find(null, '/cms/pages');
383386

384387
$page = new Page();
@@ -408,7 +411,10 @@ and add some posts::
408411
{
409412
public function load(ObjectManager $dm)
410413
{
414+
// When using PHPCR-ODM 1.0, we need to create the root path
415+
// manually. Not needed with PHPCR-ODM 1.1
411416
NodeHelper::createPath($dm->getPhpcrSession(), '/cms/posts');
417+
412418
$parent = $dm->find(null, '/cms/posts');
413419

414420
foreach (array('First', 'Second', 'Third', 'Forth') as $title) {

0 commit comments

Comments
 (0)