aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mod/pages/start.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/mod/pages/start.php b/mod/pages/start.php
index cdd3866ba..8f4e3b5e2 100644
--- a/mod/pages/start.php
+++ b/mod/pages/start.php
@@ -62,6 +62,9 @@ function pages_init() {
'access_id' => 'access',
'write_access_id' => 'access',
);
+
+ // register ecml views to parse
+ register_plugin_hook('get_views', 'ecml', 'pages_ecml_views_hook');
}
function pages_url($entity) {
@@ -325,6 +328,21 @@ function pages_container_permission_check($hook, $entity_type, $returnvalue, $pa
}
+/**
+ * Return views to parse for pages.
+ *
+ * @param unknown_type $hook
+ * @param unknown_type $entity_type
+ * @param unknown_type $return_value
+ * @param unknown_type $params
+ */
+function pages_ecml_views_hook($hook, $entity_type, $return_value, $params) {
+ $return_value['object/page'] = elgg_echo('item:object:page');
+ $return_value['object/page_top'] = elgg_echo('item:object:page_top');
+
+ return $return_value;
+}
+
// write permission plugin hooks
register_plugin_hook('permissions_check', 'object', 'pages_write_permission_check');
register_plugin_hook('container_permissions_check', 'object', 'pages_container_permission_check');