Tips tagged “Embed”
- Embed an Embed within Itself?
-
Posted on October 17, 2009 by Trevor Davis
I just wrote a blog article about this, but I figure it would be good to share here too.
We wanted to be able to show an entry that was tagged with a certain category, and if no entries were found, just show an entry with any or no category. I couldn’t think of a good way to do this, and I knew I
- Pass information between embeds
-
Posted on June 10, 2009 by Andy Harris
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:
- How to embed weblog:entries tags
-
Posted on June 10, 2009 by Andy Harris
In ExpressionEngine, you cannot embed exp:weblog:entries tags. For example, this will not work:
{exp:weblog:entries weblog="parent"}
<h1>Title</h2>
{exp:weblog:entries weblog="children"}
{details}
{/exp:weblog:entries}
{/exp:weblog:entries}In order to make it work, you have to
- Display entries from one weblog based on the results of another
-
Posted on June 09, 2009 by JonnyUK
How do you display entries from one weblog based on the results of another?
The ideal situation would be to be able to nest our weblog entry tags, similar to the following:
{exp:weblog:entries weblog="first_weblog"}
{title}
{body}
{if count == 1}
{exp:weblog:entries weblog="second_weblog"}
{title} - Embedding solves a lot of issues
-
Posted on May 29, 2009 by Kelsey Martens
If you ever have trouble parsing data, or if you’re dealing with variable collisions (usually encountered when using Addons within other module tags), consider using an embed.

For example, if I want to place some code from the Favorites module inside the {exp:weblog:entries} loop, certain
- Current Navigation Highlighting
-
Posted on May 29, 2009 by Jonathan Longnecker
An easy way to embed your navigation so it can be reused but pass the “current” class so it highlights for the page you’re on:
<ul>
<li><a
href="./">Home</a></li>
<li><a
href="dont_hire/">Don’t Hire Us</a></li>
<li><a
href="portfolio/">Portfolio</a></li>
</ul>Then when you
