[includes] Article/CE Include Modules
Include Articles and Content Elements as Modules
Currently it's only possible to include articles and CE's as modules, if you use inserttags in an HTML module. Sometimes, this won't work with some extensions that don't first replace the inserttags. These modules allow you to directly insert the content wrapped into a module frame, honouring the MODULE's ID/CSS.
This is typically useful if you allow the user to edit the Header and/or Footer text in a hidden page with Articles/CE's. Then they can edit the info in the Article and you include it in a MODULE to display on all pages.
This provides 2 modules that:
- Include Articles as a Module[/*:m:36oxwsu5]
- Include Content Elements as a Module[/*:m:36oxwsu5]
http://www.contao.org/extension-list/view/includes.html
Re: [includes] Article/CE Include Modules
:) i have see the extension...
Good idea ;)
Re: [includes] Article/CE Include Modules
+1... I can see this being very useful, thank you!
Re: [includes] Article/CE Include Modules
Great Thyon!
I've wanted to ask for such a module for a long time, glad to see you've already built it! :D I'm going to use this one all the time now :lol:
Re: [includes] Article/CE Include Modules
Re: [includes] Article/CE Include Modules
i'm glad you posted xchs, i never knew of this one.
EDIT: i mean i never knew of Thyons one ....
Re: [includes] Article/CE Include Modules
Mine does both articles and CEs.
Re: [includes] Article/CE Include Modules
Hi Thyon!
Great extension, love the idea. As mentioned before, there is a similar extension offering part of the functionality yours does. However, it implements a checkbox that let's you hide the included element, basically putting around the include. Wouldnt' that be a great idea for your extension too?
Cheers, Jannik
Re: [includes] Article/CE Include Modules
well, you can do what you like in the template... This extension cannot be hidden, what would be the point of that? It simply copies the included portion directly, in fact you can hide in therefore in the original location.
Re: [includes] Article/CE Include Modules
I only just discovered this extension though I'd needed one for a long time. Well done, very useful.
There is one bug though; when selecting a content element the content element that has the same id as the current module is not displayed.
Inside the getAlias function you use the module id as if it where a content element id. I wanted to adjust this and look at $dc->table when I realized there is no need for this at all. At best you'd need something to stop circular references when a content element includes this module that duplicates the same content element. (Same goes for articles)
Re: [includes] Article/CE Include Modules
I'll take a look, but I think I copied the code for when you select the CE/Article, and that removes all circular references.