aboutsummaryrefslogtreecommitdiff
path: root/mod/ecml/views
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-06-03 15:37:23 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-06-03 15:37:23 +0000
commit43f62a08e490728dc5505e6288188b166cc7e15f (patch)
tree67a5de7e47f591f795557a19a7a878f1ad933632 /mod/ecml/views
parent2bb9d6044b90e177c0c92aafbeb55c7e48d8383b (diff)
downloadelgg-43f62a08e490728dc5505e6288188b166cc7e15f.tar.gz
elgg-43f62a08e490728dc5505e6288188b166cc7e15f.tar.bz2
Added entity keyword to ECML. (NB: The old entity keyword is now entity_list)
git-svn-id: http://code.elgg.org/elgg/trunk@6343 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/ecml/views')
-rw-r--r--mod/ecml/views/default/ecml/keywords/entity.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/mod/ecml/views/default/ecml/keywords/entity.php b/mod/ecml/views/default/ecml/keywords/entity.php
new file mode 100644
index 000000000..47d0244cb
--- /dev/null
+++ b/mod/ecml/views/default/ecml/keywords/entity.php
@@ -0,0 +1,22 @@
+<?php
+/**
+ * ECML Generic Object GUID
+ *
+ * @package ECML
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Curverider Ltd
+ * @copyright Curverider Ltd 2008-2010
+ * @link http://elgg.org/
+ */
+
+$guid = $vars['guid'];
+
+if ($entity = get_entity($guid)) {
+ echo elgg_view('output/url', array(
+ 'href' => $entity->getURL(),
+ 'title' => $entity->title,
+ 'text' => "<img src={$entity->getIcon('tiny')}>" . $entity->title
+ ));
+} else {
+ echo elgg_echo('ecml:entity:invalid');
+} \ No newline at end of file