Skip to content

Commit

Permalink
Fixed navItem relation for inactive page versions
Browse files Browse the repository at this point in the history
  • Loading branch information
hbugdoll authored Mar 6, 2024
1 parent fb9ecc5 commit c981e19
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/models/NavItemPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -575,6 +575,14 @@ public static function copyBlocks($fromPageId, $toPageId)
return true;
}

/**
* {@inheritdoc}
*/
public function getNavItem()
{
return $this->hasOne(NavItem::class, ['id' => 'nav_item_id'])->where(['nav_item_type' => static::getNummericType()]);
}

/**
* This method is used to force the parent nav item for the corresponding page item whether the type matches or not:
*
Expand Down

0 comments on commit c981e19

Please sign in to comment.