Loading...
 
Skip to main content

History: Wiki Handler

Source of version: 40

Copy to clipboard
            ! Wiki Page Handler

Profile installer in Tiki would not be very useful without wiki pages, thus, a ((handler)) was created. To create a wiki page, the page content must exist in the profile repository. The page name is provided in the profile to reference to it.

{CODE(caption=>YAML)}
preferences:
  enable: [ feature_wiki ]
objects:
  -
    
{CODE}


! Wiki Object Parameters

||__Field name__|__Mandatory__|__Value__
type|yes|must be "wiki_page"
ref| |can link to a category or structure. see ((Object References)).
name|yes|The name of the page to be created. Can be different from local pagename.
description| |The page description.
lang| |Page language as the two letter code (ex: fr, en, es)
content|yes|Initial page content. To simplify the profile, large pages can be included from a remote location in the same profile repository. This is done by using the ''wikicontent:'' prefix, as seen in the example.
mode| |''create'', ''update'', ''append'', ''create_or_append'', ''create_or_update'' (default). Handler mode that determines behavior on existing page. ''create'' will prevent installation if page already exists. ''update'' and ''append'' require the page to exist prior to profile installation.
translations| |List of page references to be attached as translations. Use this syntax: -+ ~np~[ $pageref1]~/np~ +-, or if several: -+ ~np~[ $pageref1, $pageref2]~/np~ +-
message| |Specify the version message. Will default to modification made by profile installer. (>=4.0)
wysiwyg| |y or n. If set to y, will create/update the page in wysiwyg editor mode. Otherwise created wiki page won't load in wysiwyg mode (>=6.0)
wiki_authors_style| |''classic'', ''business'', ''collaborative'', ''lastmodif'', ''none'' (>=8.0)
geolocation| |Format is "lon,lat,zoom". Example: ''-2.373046875,40.507118572962,3'' (>=12.0)
hide_title| |y or n. If set to y, will set individual page to hide title even if global showpagename as title is on. Depends on preference wiki_page_hide_title to be on.  (>=14.0)
structure| |tba
namespace| |tba
||



!! Details
Minimally, to import a wiki page the following YAML syntax will suffice. 

{CODE(example)}
objects:
  -
    type: wiki_page
    data:
      name: todo
      content: wikicontent:todo
{CODE}

*__mind your spaces__ here each level of indentation is two spaces. (recommended). type and data are at the third level, name and content in the fourth.
*Some Object Parameters belong to the __data__ section and others (type,ref,…) are above. The above parameters table does not make it obvious. You may need to experiment.
*__Re-import is ok__ (>=tikiwiki3.0) you can load a profile multiple times in the same wiki. It will ask if you want to ''Forget'' the install - this will not remove data imported. When you re-install a profile anything new will be added. In wiki pages, it's possible to replace & append (see above options)

Alternatively, ''wikidirect:'' can be used instead of ''wikicontent:''. When used, the content of the target page will not be parsed for references, which is useful when setting up data channels.

As of Tiki 6 onwards, ''wikiparsed:'' can be used to to get the ''parsed'' (HTML) output from a page, instead of the wiki mark-up. Used with tracker filter plugins and pretty tracker templates this can make tracker data available to be used in data channels.

Another, more elaborate example follows. The template page named __template_greetings__ needs to exist to provide the content for the new page.

{CODE(other example)}
objects:
  -
    type: wiki_page
    data:
      name: Bonjour
      content: wikicontent:template_greetings
      wiki_authors_style: none
      lang: fr
{CODE}

!!List of Profiles with Wiki Handler

((Help_Pages))
((Custom_Contact_Form))
((Profile_Repository_Profile_3x))
((Example_Wiki_Profile))
... (and many more)

!! Example of Profiles using translations
* ((Consensus Forums))
* ((Collaborative_Multilingual_Terminology))

        

History

Information Version
Sun 09 of Apr, 2023 20:00 GMT-0000 Marc Laporte Deleted 49
Sat 04 of Mar, 2017 17:47 GMT-0000 Geoff Brickell updated locked parameter description 48
Sat 04 of Mar, 2017 12:16 GMT-0000 Geoff Brickell added new 'locked' option 47
Thu 04 of Aug, 2016 16:15 GMT-0000 Roman Zakharenkov Fix docs 46
Wed 03 of Aug, 2016 01:17 GMT-0000 Roman Zakharenkov Added freetags support info 45
Sun 12 of Apr, 2015 21:21 GMT-0000 Nelson Ko adding structure_as_sibling parameter 44
Mon 30 of Mar, 2015 09:49 GMT-0000 Geoff Brickell 43
Sun 29 of Mar, 2015 13:30 GMT-0000 Geoff Brickell updated the use of the structure parameter 42
Sun 29 of Mar, 2015 13:28 GMT-0000 Geoff Brickell updated use of the structure parameter 41
Thu 18 of Sep, 2014 03:09 GMT-0000 Nelson Ko add hide_title 40
Fri 15 of Aug, 2014 10:09 GMT-0000 Xavier de Pedro added other two examples 39
Fri 15 of Aug, 2014 10:07 GMT-0000 Xavier de Pedro fix description of how to use the translations param (with pagenames it doesn't work, just with [ $pagereference] 38
Sat 21 of Dec, 2013 10:47 GMT-0000 Geoff Brickell added missing wiki handler parameters 37
Wed 08 of May, 2013 04:10 GMT-0000 Jean-Marc Libs document new geolocation field 36
Tue 04 of Sep, 2012 13:26 GMT-0000 Jean-Marc Libs details about list of params and a less minimalistic example 35
Wed 14 of Sep, 2011 04:40 GMT-0000 Nelson Ko add wiki_authors_style 34
Tue 26 of Oct, 2010 03:57 GMT-0000 Nelson Ko add new wysiwyg param 33
Sat 31 of Jul, 2010 23:21 GMT-0000 Marc Laporte 32
Thu 08 of Apr, 2010 12:15 GMT-0000 Jonny Bradley 31
Thu 23 of Jul, 2009 09:32 GMT-0000 axold 30
Thu 16 of Jul, 2009 14:17 GMT-0000 System Administrator 29
Thu 14 of May, 2009 11:45 GMT-0000 System Administrator 28
Thu 14 of May, 2009 11:44 GMT-0000 System Administrator 27
Sat 25 of Apr, 2009 15:36 GMT-0000 Marc Laporte 26
Sat 25 of Apr, 2009 13:42 GMT-0000 System Administrator 25
  • «
  • 1 (current)
  • 2