Use depth for page tree serializer root_or_leaf (#1864)
Use depth for page tree serializer root_or_leaf (#1864)

Depth is a cached attribute on the page that does not need calculation and will always be correct even if the root page has been removed.

This commit helps to migrate to Alchemy 5 without making further changes to the page tree serializer. Without that change page trees that already have been migrated to "root-page-less" Alchemy 5 will have page toggle switches disappear in the first level.

robinboening/alchemy_cms,robinboening/alchemy_cms,AlchemyCMS/alchemy_cms,mamhoff/alchemy_cms,robinboening/alchemy_cms,AlchemyCMS/alchemy_cms,AlchemyCMS/alchemy_cms,mamhoff/alchemy_cms,mamhoff/alchemy_cms