DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:include

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
plugin:include [2022-01-23 22:23] – version upped michituxplugin:include [2024-03-13 18:21] (current) 91.89.222.218
Line 6: Line 6:
 email      : freaks@dokuwiki.org email      : freaks@dokuwiki.org
 type       : syntax, helper type       : syntax, helper
-lastupdate : 2022-01-23 +lastupdate : 2023-09-22 
-compatible : Greebo, Frusterick Manners, Hogfather+compatible : Greebo, Frusterick Manners, Hogfather, Igor, Jack Jackrum, Kaos
 depends    : tag depends    : tag
 conflicts  : mediasyntax, PhotoGallery conflicts  : mediasyntax, PhotoGallery
-similar    : +similar    : wst
 tags       : include, embed tags       : include, embed
  
Line 41: Line 41:
 ===== Syntax ===== ===== Syntax =====
  
-Simply enclose the ID of the page to be included in double curly brackets:+The plugin offers four syntaxes, ''%%{{page>...}}%%'' , ''%%{{section>...}}%%'' , ''%%{{namespace>...}}%%'' and ''%%{{tagtopic>...}}%%''
 + 
 +Section is aimed more at including sections, page at including whole pages and namespace at including whole namespaces. Tagtopic includes all pages with a ''tagtopic'' ''tag''.
  
   {{page>[id]&[flags]}}   {{page>[id]&[flags]}}
Line 53: Line 55:
 ^ [flags] | flags delimited by ''&'', see [[#Configuration and Flags|flags]] | optional | ^ [flags] | flags delimited by ''&'', see [[#Configuration and Flags|flags]] | optional |
  
-The plugin offers four syntaxes, ''%%{{page>...}}%%'' , ''%%{{section>...}}%%'' , ''%%{{namespace>...}}%%'' and ''%%{{tagtopic>...}}%%''. 
- 
-Section is aimed more at including sections, page at including whole pages and namespace at including whole namespaces. Tagtopic includes all pages with a ''tagtopic'' ''tag''. 
  
 ===== Configuration and Flags ===== ===== Configuration and Flags =====
Line 73: Line 72:
 ^ ''showuser''          | ''user''/''nouser''                                              | Show/hide user name of the page creator in the page footer                                                                                                                                                                                                                                                                                                                       | ^ ''showuser''          | ''user''/''nouser''                                              | Show/hide user name of the page creator in the page footer                                                                                                                                                                                                                                                                                                                       |
 ^ ''showcomments''      | ''comments''/''nocomments''                                      | Show/hide number of comments in the page footer (requires the [[plugin:discussion]] plugin)                                                                                                                                                                                                                                                                                      | ^ ''showcomments''      | ''comments''/''nocomments''                                      | Show/hide number of comments in the page footer (requires the [[plugin:discussion]] plugin)                                                                                                                                                                                                                                                                                      |
-^ ''showlinkbacks''     | ''linkbacks''/''nolinkbacks''                                    | Show/hide number of linkbacks in the page footer (requires the [[plugin:linkback|linkback]] or [[plugin:backlinks2]] plugin)                                                                                                                                                                                                                                                     |+^ ''showlinkbacks''     | ''linkbacks''/''nolinkbacks''                                    | Show/hide number of linkbacks in the page footer (requires the [[plugin:linkback|linkback]] or [[plugin:backlinks]] plugin)                                                                                                                                                                                                                                                     |
 ^ ''showtags''          | ''tags''/''notags''                                              | Show/hide tags in the page footer (requires the [[plugin:tag]] plugin)                                                                                                                                                                                                                                                                                                           | ^ ''showtags''          | ''tags''/''notags''                                              | Show/hide tags in the page footer (requires the [[plugin:tag]] plugin)                                                                                                                                                                                                                                                                                                           |
-^ ''showeditbtn''       | ''editbtn'' or ''editbutton''/''noeditbtn'' or ''noeditbutton''  | Show/hide edit button below the included page                                                                                                                                                                                                                                                                                                                                    |+^ ''showeditbtn''       | ''editbtn'' or ''editbutton''/''noeditbtn'' or ''noeditbutton''  | Show/hide edit buttons (section edit buttons, edit button below the included page)                                                                                                                                                                                                                                                                                               |
 ^ ''doredirect''        | ''redirect''/''noredirect''                                      | Redirect back to original page after an edit                                                                                                                                                                                                                                                                                                                                     | ^ ''doredirect''        | ''redirect''/''noredirect''                                      | Redirect back to original page after an edit                                                                                                                                                                                                                                                                                                                                     |
 ^ ''usernamespace''     | -                                                                | Namespace for user pages (see ''showuser'' configuration) (default ''user''                                                                                                                                                                                                                                                                                                    | ^ ''usernamespace''     | -                                                                | Namespace for user pages (see ''showuser'' configuration) (default ''user''                                                                                                                                                                                                                                                                                                    |
Line 90: Line 89:
 ^ -                     | ''beforeeach=ENTITY''/ ''aftereach=ENTITY''                      | Display an [[:entities|entity]] before/after each included page. The entity is printed outside the section/include environment, this is mainly for adding custom HTML code (when the text isn't recognized as entity it is directly displayed but escaped so you can't directly use HTML code here).                                                                             | ^ -                     | ''beforeeach=ENTITY''/ ''aftereach=ENTITY''                      | Display an [[:entities|entity]] before/after each included page. The entity is printed outside the section/include environment, this is mainly for adding custom HTML code (when the text isn't recognized as entity it is directly displayed but escaped so you can't directly use HTML code here).                                                                             |
 ^ ''safeindex''         | -                                                                | Don't index metadata of included pages that are non-public. This can cause problems with other plugins that use the metadata index and can be safely disabled in wikis where the permissions of the included pages match the permissions of the parent pages.                                                                                                                    | ^ ''safeindex''         | -                                                                | Don't index metadata of included pages that are non-public. This can cause problems with other plugins that use the metadata index and can be safely disabled in wikis where the permissions of the included pages match the permissions of the parent pages.                                                                                                                    |
-^ -                     | ''exclude=/REGEX/''                                                | Regular expression to exclude certain pages, will match on full page ID. E.g. to exclude ''ns:page_name'' use ''/ns:page_name/'' as value. Use a [[https://regex101.com/|regex tester]] to debug complicated patterns.                                                                                                                                                           |+^ -                     | ''exclude=/REGEX/''                                              | Regular expression to exclude certain pages, will match on full page ID. E.g. to exclude ''ns:page_name'' use ''/ns:page_name/'' as value. Use a [[https://regex101.com/|regex tester]] to debug complicated patterns.                                                                                                                                                           |
  
  
plugin/include.1642973004.txt.gz · Last modified: 2022-01-23 22:23 by michitux

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki