-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DOC Add changelog item for IsFirst/IsLast in elemental #631
base: 5
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For future reference the checkbox is there for the committer (you in this case) to fill in, as a way to double check everything is ready to be reviewed.
I've ticked the boxes this time around.
@@ -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 %>`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets use the same language as the other deprecations in the list.
- 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 %>`. | |
- [`BaseElement::First()`](api:DNADesign\Elemental\Models\BaseElement::First()) has been deprecated. Use [`BaseElement::IsFirst()`](api:DNADesign\Elemental\Models\BaseElement::IsFirst()) instead. | |
- [`BaseElement::Last()`](api:DNADesign\Elemental\Models\BaseElement::Last()) has been deprecated. Use [`BaseElement::IsLast()`](api:DNADesign\Elemental\Models\BaseElement::IsLast()) instead. |
Description
Docs update for silverstripe/silverstripe-elemental#1275
Issues
silverstripe/silverstripe-elemental#1274
Pull request checklist