Element Variable for Craft CMS Access any element from templates.

Developed by Yuri Salimovskiy


Accepts 2 parameters: first is element type (e.g. 'MatrixBlock', 'Asset', 'Entry', 'Commerce_Variant') second is array of criterias to fetch the element (anything supported by ElementCriteriaModel)

Example usage: {{ craft.element.get('MatrixBlock', {'type': 'video'}).first().url }}

Commercial plugins

  • Abandoned Cart

    The Abandoned Cart plugin notifies your customers that they have abandoned their shopping carts and did not finish the complete order process.
    Digital Agency WHITE, May 08, 2017

  • Sprout SEO

    Content-focused SEO. Search, Structured Data, Social Media Sharing, Redirects, and Sitemap.
    Barrel Strength Design, March 04, 2014

  • Calendar

    Create full-featured calendars and recurring events with exceptions.
    Solspace, April 25, 2016


Plugin Development 101

Don't miss any Craft tips, tricks, and community updates