---json { "layout": "median", "name": "Include Plugin", "page_id": "eq9uyeq70hv0wis6o8g0i" } --- ====== Support - Include Plugin ====== ===== About ===== The ''include plugin'' is a [[plugin|external plugin]] that permits to compose a page with the content of another page. ===== How to enable it with Combostrap? ===== By default, the include plugin (ie section syntax) will not work with ComboStrap. You need to disable the [[docs:content:heading#headingWikiEnable|combo wiki heading component]] to enable it. **Why?**: It does not work because the ''include plugin'' uses the standard Dokuwiki heading to be able to extract the content. ===== Example: Section Syntax ===== The [[doku>plugin:include|include plugin]] permits adding the content of a section with the following syntax. {{section>reference#section&nodate&inline&noeditbtn}} where: * ''inline'' will not create a section (Mandatory to [[https://www.dokuwiki.org/plugin:include#the_include_plugin_breaks_the_wrap_and_folded_and_similar_plugins_when_used_inside_them|not messed up the layout]]) * ''nodate'' will not print the data * ''noeditbtn'' should not create any edit button. ===== Support ===== ==== Why an included Heading 1 does not appear? ==== If your page has a [[:docs:theme:template:template|template]] with a [[:docs:theme:slot:main_header_slot|main header]], the [[:docs:content:heading|heading]] ''1'' is captured to not show the title twice. If you need to include an ''heading 1'' in a Combostrap page, see this [[https://github.com/ComboStrap/combo/issues/91#issuecomment-2041409876|comment]] ==== Why do I see a title in the current metadata? ==== It's because [[https://github.com/dokuwiki/dokuwiki/blob/master/inc/parser/metadata.php#L167|Dokuwiki store it]] when the heading is disabled. public function header($text, $level, $pos) { if (!isset($this->meta['title'])) { $this->meta['title'] = $text; } ... } ==== Why is the layout messed up? ==== The include plugin does [[https://www.dokuwiki.org/plugin:include#the_include_plugin_breaks_the_wrap_and_folded_and_similar_plugins_when_used_inside_them|not always return a clean HTML]]. The browser will then make a best guess and the included parts may land in another region of the [[:docs:theme:template:template|template]]. See [[https://github.com/ComboStrap/combo/issues/91|the issue 91]] for the whole explanation.