Program-Me-Rev
Program-Me-Rev

Reputation: 6624

Elgg entity listing not working

Elgg 2.1.1

I'm trying to create a custom elgg listing page that should list objects of subtype bread, but the page in /views/default/object/bread.php doesn't get picked up. What could I be doing wrong?

/views/default/object/bread.php

echo elgg_view_title($vars['entity']->title);
echo elgg_view('output/longtext', array('value' => $vars['entity']->description));
echo elgg_view('output/tags', array('tags' => $vars['entity']->tags));  

/views/default/resources/bread/bread.php

<?php

echo elgg_view_title($vars['entity']->title);
echo elgg_view('output/longtext', array('value' => $vars['entity']->description));
echo elgg_view('output/tags', array('tags' => $vars['entity']->tags));

$body = elgg_list_entities(array(
    'type' => 'object',
    'subtype' => 'bread',
));

$body = elgg_view_layout('one_column', array('content' => $body));

echo elgg_view_page("All Loaves of Bread", $body);

Upvotes: 1

Views: 100

Answers (1)

hypeJunction
hypeJunction

Reputation: 361

My guess is that you have added the view while System Cache is enabled. Flush the caches, or disable the cache during development (Admin > Settings > Advanced settings).

Upvotes: 1

Related Questions