The Joomla! Extensions Directory ™


byChrisBln, November 19, 2009
1 of 1 people found this review helpful
Include Content Item
A very helpful and excellent plugin!

As tip: i created a new section "INCLUDES" and categories like "headers" or "footers" or "styles". There i can better group special headers or footers or styles which i just include in the articles with the {include_intro 123} line. Really great and timesaving!

In order to allow that in the same article, more than once the same include is processed, i did a little modification to the original php file of this plugin, and for me it works very good!

Here is what you have to do:

locate the original file: plugins/content/include_content_item/include_content_item.lib.php

download and open this file

then and add one line between line 54 and 55 as shown here:

original code:
if (in_array($include_id, $this->processed)) {
} else {

new code:
if (in_array($include_id, $this->processed)) {
$str = $this->process(array('', $matches[2], $matches[3]));
} else {

thats it! save the file with this modification.

Before uploading, rename the original file on the server, so it is not overwritten, for the case something goes wrong.

upload and enjoy! :-)

PS. The added line is nothing else than the line 57 of the original file, so you can just copy and paste it, instead of retyping the code.

with this change, the plugin will process all include statements in one article, not skipping after the first match. (i don't know why the author included this filter, maybe only for security for complex nested includes, but in my case i have also nested includes, and had never problems)