What is the difference between include tags and embed tags in expressionengine?
Asked Answered
G

5

6

The discussion forum module for expression engine uses {include:file} tags in its templates like in forum_themes/developer/forum_index/main_forum_list.html:

{include:table_heading}
{include:table_rows}
{include:table_footer}

I've searched for the include tag documentation but I can't find it anywhere? What is the include tag and when/where should it be used? Is it specific to the discussion forum module?

Glittery answered 23/10, 2012 at 15:17 Comment(1)
Those are probably just "snippets", with a strange naming convention.Misvalue
P
9

I cannot speak to the scope of the {include:file} tag but for most purposes the {embed} tag is what you will be using in ExpressionEngine to include/embed other bits of code.

Other alternatives, depending on the information you would like to include in your page, are the Snippets, Global Variables, or for more complex information LowVariables

Parasynthesis answered 23/10, 2012 at 15:51 Comment(0)
D
8

Forums are quite difficult to customize and there is very little documentation but the include for forums essentially acts as an embed.

For customizing your forums I would recommend looking at using at the Scaffold Theme on Devot:ee

Drum answered 23/10, 2012 at 20:51 Comment(0)
O
7

It should also be noted that {include:file} only work in the forum template code and most standard EE tags (such as the {embed} tag) don't work in the forum templates. Why? I don't know, but dems da rules. :)

Obola answered 23/10, 2012 at 17:50 Comment(0)
P
4

There is no documentation on the {include:XXX} tag as it is only used in the Forum templates.

You will never use this tag in normal EE templates. In EE templates you will use an {embed="group/template"} tag or a Snippet depending on your needs.

Prohibitory answered 24/10, 2012 at 1:11 Comment(0)
S
0

In addition to embedding templates within each other, you can also create shared layouts for your templates. A layout can be thought of as a wrapping template or a reverse embed. To use a template you use the {layout=""} tag at the top of your template:

{layout="template_group/template"}

Sungsungari answered 7/12, 2020 at 5:40 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.