Skip to main content
6 events
when toggle format what by license comment
May 12, 2022 at 11:45 answer added ilazgo timeline score: 0
Nov 19, 2020 at 15:42 comment added Beau Are you intentionally overwriting $item['content']['isEven'] with a single value? If so, it might be better to define isEven as a property, so that it is written as $item['content']['#isEven']. You can add any arbitrary properties to a render array.
Nov 18, 2020 at 13:37 comment added Adrián It's a paragraph with diferent content. Inside this parapraph there are image and text block. With this code we want to add differents classes if is even or odd to all paragraphs in template.twig when page is loaded.
Nov 17, 2020 at 15:24 comment added Leigh It's probably this line $item['content']['isEven'] = ($delta % 2 == 0); you're adding something into the $item['content'] render array which isn't renderable
Nov 17, 2020 at 15:18 review First posts
Nov 17, 2020 at 15:57
Nov 17, 2020 at 15:11 history asked Adrián CC BY-SA 4.0