Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
wiki:include_plugin [2023/02/18 06:44] – removed - external edit (Unknown date) 127.0.0.1 | wiki:include_plugin [2023/02/18 06:44] (current) – ↷ Page moved from contributing:include_plugin to wiki:include_plugin suedunham | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== include plugin ====== | ||
+ | |||
+ | [[doku> | ||
+ | |||
+ | This allows the contents of one page to be included in another. It is helpful here to ease the maintenance of sidebars and image maps by allowing changes to be made in one or two places rather than in every page they appear. This can also kludge pages for out-of-print works into other additional namespaces so that they can have the same sidebars, such as [[works: | ||
+ | |||
+ | ===== Basic use ===== | ||
+ | |||
+ | One can simply write a page > link to the desired page to include its contents on the current page. | ||
+ | |||
+ | < | ||
+ | {{page> | ||
+ | </ | ||
+ | |||
+ | Note that the results will vary depending on settings made on the Administration page. HârnWiki has several departures from plugin defaults with the aim of making the [[:works:]] header icons entries brief. This means that, with current settings, a plugin-default display can be had with the following: | ||
+ | |||
+ | < | ||
+ | {{page> | ||
+ | </ | ||
+ | |||
+ | ===== Particular use cases ===== | ||
+ | |||
+ | Those and other flags may be set when including a page. Here are some that the present editor has found useful. | ||
+ | |||
+ | ==== noheader/ | ||
+ | |||
+ | Sometimes it is desirable to show the first header from the included page, and sometimes not. The big difference apparent so far is what happens to the other headings on the page. For instance, this very page has itself been included on [[plugins_editor]] like so: | ||
+ | |||
+ | < | ||
+ | {{page> | ||
+ | </ | ||
+ | |||
+ | For the positive case, either ''& | ||
+ | |||
+ | Note how what is Heading 1 on this standalone page becomes a Heading 2 on that page, and so on down the line. This effect is useful in this case, when a composite page is formed from several also-independent ones. It would not be desirable on a page like [[works: | ||
+ | |||
+ | ==== noeditbutton/ | ||
+ | |||
+ | This, as in the example above, shows a button allowing the user to edit the included page from the page on which it is included. It is very useful but does sometimes stack oddly with the other section-editing buttons. | ||
+ | |||
+ | The main thing is to remember that this otherwise-shown-by-default setting has been reversed in HârnWiki and that it saves a bit of hassle later to type it in now. | ||
+ | |||
+ | Abbreviated flags also work: ''& | ||
+ | |||
+ | ==== nofooter/ | ||
+ | |||
+ | The present editor doesn' | ||
+ | |||
+ | ==== inline ==== | ||
+ | |||
+ | This option is used in all of the '' | ||
+ | |||
+ | < | ||
+ | {{page> | ||
+ | {{page> | ||
+ | </ | ||
+ | |||
+ | Pages included inside [[bootstrap_wrapper_plugin]] tab controls utilize this flag as well. This can also be used in a table as a way of placing a multi-paragraph entry in a single cell. I don't think any examples persist in this wiki. Indeed, this section may have been the only one where that was in evidence, long ago. | ||