Published by Mijingo

tips icon image

EE Insider Tips
Sponsored by Mijingo's EE 2 Screencasts

ExpressionEngine mini-howtos created by the EE Insider community.

Pass information between embeds

User's avatar
  • Posted by Andy Harris
  • June 10, 2009
  • 4 people have found this tip helpful.

One of the most powerful features of ExpressionEngine is the ability to pass information into embeds. This is easy to achieve - in this example, we pass the word ‘ball’ into our embed:

{embed="includes/embed_file" word="ball"

Then the embed template can access this information thusly:

I have received the word {embed:word} 

You can pass all sorts of data into embeds, and used wisely you can massively cut down on code replication.

Add Your Comment?

You must have an EE Insider account to post comments on Insider Tips. It's fast, easy and hassle-free.

Sign up now (or login).

Search EE Insider Tips
Sponsored By