When elgg is rendering a page, all the info to make some very powerful search accessible pages is there... but I've got no idea how to get to it.
I need to put a meta description, and keywords in the header output but the $vars passed to the header do not include anything other than a title. Obviously at this point of render elgg already knows what it's using, so I should be able to access things like entity->tags entity->description... but first I need to know how to get to the entity it's currently displaying (or list).
Has anyone found a solution to this yet? I know elgg is young, but this is really going to hurt sites using it until it's addressed as far as new users finding them. If you want to see what I mean check out what google has indexed for this site:
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.
- Maximus Marius@mariuszekpl
Maximus Marius - 0 likes
- many XML pages like community.elgg.org/export/opendd/6460/ if you want remove it you can use robots.txt
- Alex Morse@alexmorse
Alex Morse - 0 likes
- Oliver Lillie@buggedcom
Oliver Lillie - 0 likes
- Team Webgalli@webgalli
Team Webgalli - 0 likes
- Alex Morse@alexmorse
Alex Morse - 0 likes
- Alex Morse@alexmorse
Alex Morse - 0 likes
- Alex Morse@alexmorse
Alex Morse - 0 likes
- Team Webgalli@webgalli
Team Webgalli - 0 likes
- Alex Morse@alexmorse
Alex Morse - 0 likes
- tbr@MavrcK145
tbr - 0 likes
You must log in to post replies.When i open site:community.elgg.org i see:
That's really not at all the issue. Every page has the same description, which is not at all useful for people trying to find things. There's no keyword or description meta info.
I've got a plugin for my own cms that pulls out meta data and forms descriptions and keywords from page content. I'll try to write a plugin based on that for Elgg this weekend
I am also in great need of it.
@ Oliver please include the pages pluggin also in your new pluggin for seo :-)
That's what I'm looking for how to do. I just can't find enough documentation on Elgg to know how to instantiate the entity in question within the header. I'm sure there's probably several ways to do it.
Really all you'd need is the guid of the entity (or entities) passed into the header $vars.
What I need to make this work is to throw something into the $vars that the header view accesses. I don't think $_SESSION will work with bots. $CONFIG would be a mess as that's a site wide config.
I see $sidebar defined... and I don't see anywhere that's being used. I'd guess that maybe that was put in place earlier on in development, and then as the view model matured they replaced it with 'area#' . If that's the case, I can make a hack that works to my purposes, but it isn't pretty.
So here's what I'm doing until a real solution can be found. page_draw has an optional parameter $sidebar. I've looked around on reference.elgg.org, but I can't find it actually being USED anywhere.
So I'm stuffing data into sidebar, which I can then access in the header view via $vars['sidebar'] and using that to populate keywords and descriptions. This works great for blog posts as they've got tags and descriptions. For groups I'm just using the description since they aren't tagged.
Later today I hope to put my head around a method to aggregate some tags for listing pages.
thank you alex. please keep it going. i am witing for it :-)
This has helped a lot for my site in google results. Compare to this site.
site:ipapi.org
This is still needed... title tags work now but permalinks or seo friendly urls and keyword and description meta tags also need to be added