Alternative full-featured embed

1.1.2 2014-08-07 12:51 UTC


Improved and extended embedding for Elgg 1.8 & 1.9

Buy me a burger to go with my beer!


  • Search, upload and embed files on the spot
  • Search and embed all other registered object types on the spot
  • ECML-ready
  • Resolve and embed remote URLs using Iframely


Using Elgg Customizable Markup Language (ECML)


By default, the following attributes are allowed for the ECML 'embed' keyword. You can extend the list of allowed attributes via 'ecml:attributes:entity', 'embed' hook.

  • guid guid of an entity
  • list_type list type, e.g. list or gallery
  • full_view entity listing to show
  • size icon size
  • context a comma separated list of contexts to push into the context stack by default, the entity views will be in embed and widgets contexts

Alternative use of the ECML 'embed' keyword allows the standalone src attribute. You can extend the list of allowed attributes via 'ecml:attributes:src', 'embed' hook.

Example ECML embed string:

[embed guid="555" list_type="gallery" full_view="true" size="large" context="activity,search"]
[embed src="http://youtube.com/893dkeie9"]


You can add custom views to embed/ecml/$type/$subtype. See embed/ecml/object/file for an example.

Developer Notes

  • Use output/embed view to output an embedded URL:
echo elgg_view('output/embed', array(
    'value' => 'https://github.com/Elgg/Elgg'

Installing with Composer

hypeEmbed can be included in your Elgg project by require from the project's root composer.json.

Support for composer in Elgg is an experimental feature pioneered by @Srokap.

Provisional config to include hypeEmbed into your project:

    "minimum-stability": "dev",
    "require": {
        "hypejunction/hypemebed" : "@stable"


alt text alt text alt text