From ebc7d4e86956775c700da4c60b027b30cc6adc9f Mon Sep 17 00:00:00 2001 From: Loz Calver Date: Fri, 15 Nov 2024 15:11:53 +0000 Subject: [PATCH] DOC Add changelog item for IsFirst/IsLast in elemental --- en/08_Changelogs/5.4.0.md | 1 + 1 file changed, 1 insertion(+) diff --git a/en/08_Changelogs/5.4.0.md b/en/08_Changelogs/5.4.0.md index 14b18557..a18e72f2 100644 --- a/en/08_Changelogs/5.4.0.md +++ b/en/08_Changelogs/5.4.0.md @@ -72,6 +72,7 @@ The `SilverStripe\CMS\Model\SiteTree.DESCRIPTION` localisation key (along with t ## API changes - The class names for the `TopPage` feature in [`dnadesign/silverstripe-elemental`](https://github.com/silverstripe/silverstripe-elemental) do not follow the correct naming convention for Silverstripe CMS. The existing classes have been deprecated and will be renamed to match the correct naming convention in a future major release. +- For `BaseElement::First()` and `BaseElement::Last()` in [`dnadesign/silverstripe-elemental`](https://github.com/silverstripe/silverstripe-elemental) have been deprecated and `IsFirst()` and `IsLast()` have been added to replace them. This is to more closely match core template loop behaviour where `$IsFirst` and `$IsLast` have been used since CMS 5. These methods are commonly used in element templates, e.g. `<% if $First %>`/`<% if $Last %>`: please update usages to `<% if $IsFirst %>`/`<% if $IsLast %>`. - [`SilverStripe\ORM\ArrayLib`](api:SilverStripe\ORM\ArrayLib) has been deprecated. It will be renamed to `SilverStripe\Core\ArrayLib` - [`SilverStripe\ORM\ArrayList`](api:SilverStripe\ORM\ArrayList) has been deprecated. It will be renamed to `SilverStripe\Model\List\ArrayList` - [`SilverStripe\ORM\Filterable`](api:SilverStripe\ORM\Filterable) has been deprecated. It will be merged into [`SS_List`](api:SilverStripe\Model\List\SS_List).