Re:Include content item multy times with same ID (1 viewing) (1) Guest
Favoured: 0
|
|
|
TOPIC: Re:Include content item multy times with same ID
|
bata (User)
Fresh Boarder
Posts: 2
|
|
Include content item multy times with same ID 10 Months, 3 Weeks ago
|
Karma: 0
|
|
Why it's not possible to include content item using the same ID several times inside an article?
text
include_content_item 123
text
include_content_item 123
text
include_content_item 123
|
|
|
|
|
|
|
Last Edit: 2009/10/20 23:03 By bata.
|
|
|
The administrator has disabled public write access.
|
kksou (Admin)
Admin
Posts: 1240
|
|
Re:Include content item multy times with same ID 10 Months, 3 Weeks ago
|
Karma: 20
|
|
Hi,
It's because the Include Content Item supports nested include. If I don't check for this, there might be cyclic reference that goes into infinite loop. (Imagine a person including article 101, that includes article 102, and then article 103. Then in article 103, it includes article 101.)
So the program checks for multiple include of the same article. If there's duplicate id, it assumes it's a cyclic reference and ignore the repeated include articles.
Regards,
/kksou
|
|
|
|
|
|
|
The administrator has disabled public write access.
|
bata (User)
Fresh Boarder
Posts: 2
|
|
Re:Include content item multy times with same ID 10 Months, 3 Weeks ago
|
Karma: 0
|
|
Yep! Thanks for rapid answer.
But, maybe it could be controlled by some parameter, so if you know that editors will take care of it, than it is very helpful if you have this option available.
I tried to use it as some Shared Content so each time when I should repeat something several times in the same article, I would include content from another article which holds that shared content.
Very common inside reference material or documentation.
|
|
|
|
|
|
|
Last Edit: 2009/10/20 23:18 By bata.
|
|
|
The administrator has disabled public write access.
|
kksou (Admin)
Admin
Posts: 1240
|
|
Re:Include content item multy times with same ID 10 Months, 2 Weeks ago
|
Karma: 20
|
|
Hi,
If you really need this feature:
1) Go to the folder: plugins/content/include_content_item
2) Edit the file: include_content_item.lib.php
3) Change Line 36: $this->processed = array($id);
to:
$this->processed = array();
4) Comment out line 56: $this->processed{} = $include_id;
That's it! Save and close the file.
This will skip the checking of duplicate id.
Regards,
/kksou
|
|
|
|
|
|
|
Last Edit: 2009/10/25 00:40 By kksou.
|
|
|
The administrator has disabled public write access.
|
Broiler (User)
Fresh Boarder
Posts: 1
|
|
Re:Include content item multy times with same ID 1 Week, 5 Days ago
|
Karma: 0
|
|
Hi,
thx for that great plugin!!!
I also needed to turn off nested, to show some Contents more than once.
Maybe a switch is helpful... let the admin know and decide...
Regards
Broiler
|
|
|
|
|
|
|
The administrator has disabled public write access.
|
kksou (Admin)
Admin
Posts: 1240
|
|
Re:Include content item multy times with same ID 2 Days, 19 Hours ago
|
Karma: 20
|
|
Hi,
Sorry for the late reply. I'm on a business trip right now and do not have access to my development machine.
Will try to release a new version this weekend to add a switch that allows you to include contents more than once.
Regards,
/kksou
|
|
|
|
|
|
|
The administrator has disabled public write access.
|
|
|
|
|