aboutsummaryrefslogtreecommitdiff
path: root/mod/categories/pages
diff options
context:
space:
mode:
authorBrett Profitt <brett.profitt@gmail.com>2011-10-13 19:02:39 -0700
committerBrett Profitt <brett.profitt@gmail.com>2011-10-13 19:02:39 -0700
commita11aec8c7b88e78581a5550c059c2cfab099a02d (patch)
treecc2b8b79e540d5168db5bd70989270632276bead /mod/categories/pages
parentbe83d770dbcdc3c65ee8837b3762e2086ada4eca (diff)
downloadelgg-a11aec8c7b88e78581a5550c059c2cfab099a02d.tar.gz
elgg-a11aec8c7b88e78581a5550c059c2cfab099a02d.tar.bz2
Fixes #3746. Moved the categories page handler script. Updated the layout call.
Diffstat (limited to 'mod/categories/pages')
-rw-r--r--mod/categories/pages/categories/listing.php39
1 files changed, 39 insertions, 0 deletions
diff --git a/mod/categories/pages/categories/listing.php b/mod/categories/pages/categories/listing.php
new file mode 100644
index 000000000..8924506e9
--- /dev/null
+++ b/mod/categories/pages/categories/listing.php
@@ -0,0 +1,39 @@
+<?php
+/**
+ * List entities by category
+ *
+ * @package ElggCategories
+ */
+
+$limit = get_input("limit", 10);
+$offset = get_input("offset", 0);
+$category = get_input("category");
+$owner_guid = get_input("owner_guid", ELGG_ENTITIES_ANY_VALUE);
+$subtype = get_input("subtype", ELGG_ENTITIES_ANY_VALUE);
+$type = get_input("type", 'object');
+
+$params = array(
+ 'metadata_name' => 'universal_categories',
+ 'metadata_value' => $category,
+ 'types' => $type,
+ 'subtypes' => $subtype,
+ 'owner_guid' => $owner_guid,
+ 'limit' => $limit,
+ 'full_view' => FALSE,
+ 'metadata_case_sensitive' => FALSE,
+);
+$objects = elgg_list_entities_from_metadata($params);
+
+$title = elgg_echo('categories:results', array($category));
+
+$content = elgg_view_title($title);
+$content .= $objects;
+
+$body = elgg_view_layout('content', array(
+ 'content' => $content,
+ 'title' => $title,
+ 'filter' => '',
+ 'header' => '',
+));
+
+echo elgg_view_page($title, $body);