I want to put related post in page/elements/sidebar , and i need entity/guid of the current page
but i don't know how to do it
for example
i open http://localhost/hahaha/file/view/71/hbhjb
the guid is 71
but how to get '71' automatically?
i have tried to use $vars['entity'] and it doesn't work. is there some tricks to do this ?
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.
- ihayredinov@ihayredinov
ihayredinov - 0 likes
You must log in to post replies.You have to either pass it down the view chain from the resource view, or sniff the URL segments. This can help: https://github.com/mrclay/elgg-url-sniffer