Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Patch includes a preprocess function in addition to a twig template.
Comment | File | Size | Author |
---|---|---|---|
#5 | d8tts-authorize-report-1823552-2.patch | 2.18 KB | EVIIILJ |
d8tts-authorize-report.patch | 2.18 KB | EVIIILJ |
Comments
Comment #1
vlad.dancerAdd "*" or remove this line
Comment #2
vlad.dancerStatus
Comment #3
merdekiti CreditAttribution: merdekiti commentedIn the preprocess function you are using $item_lists[] = theme('item_list', array('items' => $items, 'title' => $heading));
The items attribute can be only an array. Please, look at the template_preprocess_item_list(&$variables)
"
...
// Items.
if ($variables['items']) {
foreach ($variables['items'] as $key => $item) {
if (is_array($item)) {
_template_preprocess_item_list_item($item);
$variables['items'][$key] = $item;
}
}
}
...
"
So could you change the line to
$item_lists[] = theme('item_list', array('items' => array($items), 'title' => $heading));
Thanks!
Comment #4
decafdennis CreditAttribution: decafdennis commented6th line was prolly meant to append to the array and should be:
Comment #5
EVIIILJ CreditAttribution: EVIIILJ commented@vlad.dancer: Not sure what you mean in regards to the #1? Is there a limit to the amount of characters per line for a comment?
@merdekiti and naquah: Thank you both for catching the array error!
Attached is a patch correcting the array error. I also made sure that $variables['item_lists'] was always set to the template #1822142-3: Create preprocess function for theme('node_preview') <- (bottom of this comment).
Comment #6
EVIIILJ CreditAttribution: EVIIILJ commentedupdated status
Comment #7
vlad.dancerThanks!
Comment #8
podarokThanks!!!
commited / pushed to front-end