I am trying to extract excerpts to display in meta description on each page of elgg 1.8.8. Something like that.
<meta name="description" content="<?php echo $excepts; ?>" />
<meta name="keywords" content="<?php echo $tags; ?>" />
I found this article to this but it is for 1.7
I asked same question in community but nobody reply.
I really appriciate if you give me some right directions on this.
Below is a link to community discussion. I also mention some more code there.
Thanks
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.
@ Dhrup what is new in your code I already mention this in my comments, if you really want to help me and other member, please let me know how to pass entity in $vars.
I already tested below code and it display blank discription.
var_dump your $vars['entity']
Then you can see if you have an entity, and if the entity has a description for you to work with
exactly where / which file - is that code located u r writing ?i we really want to help.. but you need to help us to please help you so that this will be usefull for everyone --> give us more info - b/c that bitty code is correct, looks like you maybe have just put into the wrong file ? !;-) $vars['entity'] is a php data construct which elgg uses to pass data to a view. you can know how to pass entitiess' data to views here -- http://docs.elgg.org/wiki/Engine/Views, http://docs.elgg.org/wiki/Tutorials/Blog.
- Previous
- 1
- 2
- Next
You must log in to post replies.