There was a generic 'view' function in Elgg, but this was removed.
So you need to add it yourself
if you want to get the correct url for your object register for 'entity:url' hook see http://learn.elgg.org/en/2.0/guides/hooks-list.html#guides-hooks-list-other. Return something like journal/view/<guid>/<friendly title>
In you page_handler catch /view and make a resource /journal/view.php. Do your displaying in this resource view (see blog for an example)
Thanks!
Since the guide recommended overriding the getUrl() method, I decided to do it that way. (I first thought I shouldn’t...) Anyway, I got it to work and it was pretty easy to look at the blog plugin’s code for how it could be done. Or at least I assume that the blog plugin overrides the method. The wording isn’t very clear on that.
I’ll work on rewriting the blog tutorial so that it’ll be up to date.
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by Raül Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.