I'm trying to use this variable on JavaScript but I can't because this variable seems empty, I'm trying this too:
echo $vars['item'];
and the result is nothing. I need this variable working in a Ajax php view but I just can use the GUID because I can echo $guid; but I can't echo $vars['item']; I don't know why
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.
- dranii@dranii
dranii - 0 likes
- Juho Jaakkola@juho.jaakkola
Juho Jaakkola - 0 likes
- DavidLycaweb@DavidDesign
DavidLycaweb - 0 likes
You must log in to post replies.Did you see the ref on $vars['item']
Not sure whether this will help you at all but here are the links
http://learn.elgg.org/en/latest/guides/river.html
http://reference.elgg.org/river_2elements_2body_8php.html
http://reference.elgg.org/river_2elements_2summary_8php.html
BTW, is it possible to change your icon/photo :-) Thanks.
Dranii is correct. That variable gets populated only in the river view on the server side.
In which view are you trying to access it?
@juho.jaakkola I'm trying to call a River view with Ajax, It's done, I made it, but not the entire view because it is not possible to use the variable $vars['item']; on JavaScript. I don't understand why I can't echo this variable on the river, it supose to work on river right? But if I try to do this:
echo $vars['item'];
don't shows anything.
The hypeScraper Ajax load is finally working with this code on file river view:
And this code on the Ajax view:
So, now the hypeScraper URL views are loading after the page is fully loaded, but this is not working on River Adon wires because River Adon is not loading the <script></script> I don't know why, I suppose it's a JS filter but I can't find it.
@dranii I don't understand the icon/photo issue.