The sdInclude command is used to include one Joomla! article in another. To demonstrate, an article entitled "sdMacros Tutorial - Quick Brown Fox" was created containing some text. Only the command {sdInclude "sdMacros Tutorial - Quick Brown Fox"/} was needed to insert that article as the following paragraph:

The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.

The previous paragraph is not in this article. It can be included more than once in this article or in another article. If the article is changed it will change everywhere it is included.  For good measure we'll include it one more time with a different font:

The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.

 


 

The included articles can also contain HTML. The article "sdMacros Tutorial - Logo" contains the HTML to display the sdMacros logo. To display the logo we just include the article using the command {sdInclude "sdMacros Tutorial - Logo"/} like this:

sdMacros Logo

 

Advanced

The sdInclude command also has some advaned attributes that can be added:

"displayHTML" is used to display the raw HTML contained in an article.  For example {sdInclude:displayHTML "sdMacros Tutorial - Logo"/} produces the following:

<img src="/images/logos/logo-sdMacros.1-210x70-p25.png" alt="sdMacros Logo" title="sdMacros Logo" style="vertical-align: middle;" align="middle" />

 

"childTagsOnly" is used to display the raw HTML contained in an article.  For example {sdInclude:childTagsOnly "sdMacros Tutorial - Logo"/} produces the following: