Posted by ErichSteinboeck on 21 Mar 2009 11:57, last edited by James Kanjo on 09 May 2010 05:50
As implemented, the [[include …]] tag allows to include a block of text as separate lines or paragraphs, but does not allow to include text “inline,” i. e. within a single line.
There have been quite some discussions if and how such an “inline include” could be done. Here is a workaround how to do it.
Step by Step
Step 1
Create your included page with
- a leading comment ([!----]) and
- a trailing backslash (\)
e. g.
[!----]included //inline// and **may** contain formatting\
Step 2
Create your include statement with
- a trailing backslash (\) added to the text that goes before the inline include, and
- a leading comment ([!----]) before the text that goes after the inline include
e. g.
Text can be \
[[include inc]]
[!----] tags as you like
Examples
| What you type … | What you get … |
|
Text can be \ |
Text can be included inline and may contain formatting tags as you like |
How it Works
As an [[include …]] introduces two consecutive line breaks both before and after the include, a way to remove those two line breaks is:
- remove the first line break by appending a trailing backslash (“\”) to the line preceding the two line breaks, and
- remove the second line break by prepending a leading Wikidot comment ([!----]) to the line following the two line breaks (similar to how a trailing “\” removes the following line break, a leading comment will remove the previous line break).
Backlinks
Author
ErichSteinboeck. Please visit his/her userPage.
Other(!) HowTos posted by ErichSteinboeck
- System Variables
- Set Up An Infobox
- Create Sortable List of Pages
- Include With Defaults
- Include Part Of A Page Only
- Module Attributes via URL
- System Variables: Details
- Page Count
- ListPages: Automatic Header
- Nested Comments
- Date: How Long Ago?
- Include a Forum Thread
- Include Part Of A Page Only (Tricky Version)
- Direct Links to Sub-Pages of System Pages
- Feed/FrontForum/ListPages/live template — %%date%%
- How Many Days Does Your Wiki Exist
- Set Up an Infobox — Exclude Specific Attributes
- Iframe Link





