Ah alright that explains it, thanks for looking it up 🙈 I will try to search the docs more in the future.
> are you trying to get all 3? just do
$articles->exclude(['ID' => 20])
yes I'm trying to get all 3, ah ye exclude ofc 🙈 thanks 👏
Why does the
:not return 0 though?
oh yea always forget the $owns 🙈 yep that's the issue... thanks @dorsetdigital 👏
- private static $has_one = [
- 'File' => File::class,
My brain aint working right now
- <% loop $Documents %>
- <!-- Document has_one File -->
- $FileID <!-- works -->
- $File.ID <!-- nope -->
- <a href="$File.Link"><p>$Title</p></a>
- <% end_loop %>
Why can't I access the File object? I've fallen into this trap so many times before.. 🙈
@andante Noicee! works, thanks a lot! 😄
Is it possible to add a new CMS field as the first field in a tab without knowing the insertBefore field?
- class BaseElementExtension extends DataExtension
- const BASE_ELEMENT_TITLE_FIELD_KEY = 'Title';
- * @param FieldList $fields
- * @return FieldList
- public function updateCMSFields(FieldList $fields)
- // Remove the default Title field (it is a combined field with Title & ShowTitle)
- $titleField = TextField::create(self::BASE_ELEMENT_TITLE_FIELD_KEY, 'Internal title');
- $fields->addFieldToTab('Root.Main', $titleField); // <- I want this field first in the tab!
- return $fields;
@dorsetdigital Alright, good to know -> then I will update my project's readme 😄 Thanks 👍!
https://github.com/dnadesign/silverstripe-elemental/issues/708 -> The model admin is unable to load the elemental area if it contains blocks which have been removed codewise, so what's the recommended way for removing blocks? Currently if I remove a block/element module and forget to remove it from all my pages I manually go into the DB and remove the Element rows, is this the only solution?