People who code: we want your input. Take the Survey

Hot answers tagged

3

You need to use newParentId: $navigationItem = new Entry(); $navigationItem->typeId = 4; $navigationItem->sectionId = $navigationSection->id; $navigationItem->title = $entry->title; $navigationItem->newParentId = $herbsNavigationEntry->id; $navigationItem->setFieldValue('navLink', '/tags/' . $entry->slug); if (!Craft::$app->...


Only top voted, non community-wiki answers of a minimum length are eligible