Closed (fixed)
Project:
Lost & found issues
Component:
Twig templates
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
25 Oct 2012 at 23:38 UTC
Updated:
11 Nov 2012 at 19:10 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
vlad.dancerAdd "*" or remove this line
Comment #2
vlad.dancerStatus
Comment #3
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 commented6th line was prolly meant to append to the array and should be:
Comment #5
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 commentedupdated status
Comment #7
vlad.dancerThanks!
Comment #8
podarokThanks!!!
commited / pushed to front-end