featured.php 755 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. /**
  3. * list featured blogs
  4. */
  5. $params["filter_context"] = "featured";
  6. $options = array(
  7. "type" => "object",
  8. "subtype" => "blog",
  9. "full_view" => false,
  10. "metadata_name_value_pairs" => array(
  11. array("name" => "status", "value" => "published"),
  12. array("name" => "featured", "value" => "0", "operand" => " > "),
  13. )
  14. );
  15. $title = elgg_echo("blog_tools:menu:filter:featured");
  16. elgg_push_breadcrumb($title);
  17. elgg_register_title_button();
  18. $list = elgg_list_entities_from_metadata($options);
  19. if (!$list) {
  20. $params["content"] = elgg_echo("blog:none");
  21. } else {
  22. $params["content"] = $list;
  23. }
  24. $params["sidebar"] = elgg_view("blog/sidebar", array("page" => null));
  25. $body = elgg_view_layout("content", $params);
  26. echo elgg_view_page($title, $body);