DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:catlist

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:catlist [2021-07-25 14:20] – Fixed quotes in code xifplugin:catlist [2024-03-07 19:31] (current) – Tested OK with Jack + Kaos dregad
Line 6: Line 6:
 email      : xcodexif@xif.fr  email      : xcodexif@xif.fr 
 type       : Syntax type       : Syntax
-lastupdate : 2021-07-21 +lastupdate : 2023-12-16 
-compatible : "Frusterick Manners", Detritus, Elenor Of Tsort, Greebo, Hogfather+compatible : Detritus, Elenor of Tsort, Frusterick Manners, Greebo, Hogfather, Igor, Jack Jackrum, Kaos+
 depends    :  depends    : 
 conflicts  conflicts 
Line 24: Line 24:
 ===== Screenshots ===== ===== Screenshots =====
  
-Example page [[http://wiki.xif.fr|here]]. On the right, another example sidebar using Bootstrap.+Example page [[http://wiki.xif.fr|here]].
  
-{{http://dev.xif.fr:7979/catlist/screenshot_both.png?nolink}}+{{http://dev.xif.fr:7979/catlist/screenshot_test_cols.png?nolink}}
  
-Example using columns: 
-{{http://dev.xif.fr:7979/catlist/screenshot_columns.png?nolink}} 
  
 ===== Syntax ===== ===== Syntax =====
Line 37: Line 35:
 The namespace itself is optional. If not provided, the namespace of current page is used by default (equivalent to ''.:'').\\ The namespace itself is optional. If not provided, the namespace of current page is used by default (equivalent to ''.:'').\\
 Relative (''.:ns'') and parent (''ns1:..:ns2'') namespaces can be used. Relative (''.:ns'') and parent (''ns1:..:ns2'') namespaces can be used.
 +
 +==== More specific syntax ====
  
 Note that ''.'' refers to the page where the ''<catlist>'' tag is. **For use in a sidebar**, where the //displayed// page is what you want as the base namespace, use the syntax <code><catlist %%CURRENT_NAMESPACE%%></code> Note that ''.'' refers to the page where the ''<catlist>'' tag is. **For use in a sidebar**, where the //displayed// page is what you want as the base namespace, use the syntax <code><catlist %%CURRENT_NAMESPACE%%></code>
Line 59: Line 59:
 |  ''-noNSHeadTitle''                  Don't use the title of the start pages as namespace displayed name (overwrites the above options).  | |  ''-noNSHeadTitle''                  Don't use the title of the start pages as namespace displayed name (overwrites the above options).  |
 |  ''-hideNotFoundMsg''                Don't show an error message when the namespace is not found  | |  ''-hideNotFoundMsg''                Don't show an error message when the namespace is not found  |
-^  Exclude options (can be used multiple time and in combination)                       ^^+^  Exclude options (can be used multiple time and combined)                       ^^
 |  ''-exclude:{//page1 ns1(:) ns2:page2 …//}''  |  Exclude a list of pages/namespaces based on **full IDs relative** to the listed namespace. For namespaces, the optional trailing '':'' indicates that the content is excluded, but the namespace itself is shown (same behavior as ''exclunsall'' below).  | |  ''-exclude:{//page1 ns1(:) ns2:page2 …//}''  |  Exclude a list of pages/namespaces based on **full IDs relative** to the listed namespace. For namespaces, the optional trailing '':'' indicates that the content is excluded, but the namespace itself is shown (same behavior as ''exclunsall'' below).  |
-|  ''-exclupage:((!)%%"%%//regex//%%"%%)''        Exclude pages that match with //regex// if provided; otherwise exclude all pages.  |+|  ''-exclupage((!):%%"%%//regex//%%"%%)''        Exclude pages that match with //regex// if provided; otherwise exclude all pages.  |
 |  ''-excluns((!):%%"%%//regex//%%"%%)''          Exclude namespaces that match with //regex// if provided; otherwise exclude all namespaces  | |  ''-excluns((!):%%"%%//regex//%%"%%)''          Exclude namespaces that match with //regex// if provided; otherwise exclude all namespaces  |
 |  ''-exclunsall((!):%%"%%//regex//%%"%%)''      |  Exclude all content of subnamespaces that match with //regex// if provided; otherwise don't show content of subnamespaces  | |  ''-exclunsall((!):%%"%%//regex//%%"%%)''      |  Exclude all content of subnamespaces that match with //regex// if provided; otherwise don't show content of subnamespaces  |
Line 85: Line 85:
 |  Default : shows an ''Add page...'' button only for listed namespace. If you want ''Add page...'' buttons only for subnamespaces, use both options.  || |  Default : shows an ''Add page...'' button only for listed namespace. If you want ''Add page...'' buttons only for subnamespaces, use both options.  ||
 ^  Sort options                       ^^ ^  Sort options                       ^^
-|  ''-sortAscending''                  Ascending Sort (alphabetically : 1→9→A→Z→a→z)   | +|  ''-sortAscending''                  Ascending sort (alphabetically : 1→9→A→Z→a→z)   | 
-|  ''-sortDescending''                |  Descending Sort  |+|  ''-sortDescending''                |  Descending sort  |
 |  ''-sortByTitle''                    Use page title (not page ID, which is the **default**) for sorting  | |  ''-sortByTitle''                    Use page title (not page ID, which is the **default**) for sorting  |
 +|  ''-sortByModifDate''                Sort by (non-minor) modification date rather than by name  |
 +|  ''-sortByCreationDate''            |  Sort by creation date rather than by name  |
 |  ''-sortByType''                    |  Additionally, put all namespaces at the beginning  | |  ''-sortByType''                    |  Additionally, put all namespaces at the beginning  |
-|  **Note :** no sorting by default, ''-sortAscending'', ''-sortDescending'' or ''default_sort'' must be set before using ''-sortByTitle'' or ''-sortByType''  ||+|  **Note :** there is no sorting by default, ''-sortAscending'', ''-sortDescending'' or ''default_sort'' **must be set** before using ''-sortByTitle''''-sortByType'' or ''-sortByWhateverDate''  ||
 ^  ACL options                       ^^ ^  ACL options                       ^^
 |  ''-ACLshowPage''                    Force showing pages for which the user doesn't have read permission (entry would be shown, but without link). Not necessary to enable ''show_leading_ns'', but ''-ACLhideNs'' prevails.  | |  ''-ACLshowPage''                    Force showing pages for which the user doesn't have read permission (entry would be shown, but without link). Not necessary to enable ''show_leading_ns'', but ''-ACLhideNs'' prevails.  |
Line 98: Line 100:
  
 |  ''useheading''  |  Default use of page title vs page ID for item display. **Enabled** by default.  | |  ''useheading''  |  Default use of page title vs page ID for item display. **Enabled** by default.  |
-|  ''default_sort''      |  Default sort order. ''none'' (filesystem sorting, by **default**), ''ascending'', ''descending''  |+|  ''default_sort''      |  Default sort order. ''none'' (filesystem order, by **default**), ''ascending'', ''descending''  | 
 +|  ''sort_collator_locale''  |  Locale used to sort page names. When not empty, [[https://www.php.net/manual/en/class.collator.php|PHP Collator class]] is used; should be a valid locale short code, for example ''fr_FR''. When empty, plain alphanumeric sorting is used (default behavior).  |
 |  ''nocache''            Disable the cache on pages where catlist is used  | |  ''nocache''            Disable the cache on pages where catlist is used  |
 |  ''hide_index''        |  Don't show index pages, namely pages which are used as main page (title and link) for a namespace in catlist. **Enabled** by default.  | |  ''hide_index''        |  Don't show index pages, namely pages which are used as main page (title and link) for a namespace in catlist. **Enabled** by default.  |
Line 106: Line 109:
 |  ''show_leading_ns''  |  Show leading namespaces to a page for which a user has ACL read permissions regardless of user ACLs on namespace. **Disabled** by default.  | |  ''show_leading_ns''  |  Show leading namespaces to a page for which a user has ACL read permissions regardless of user ACLs on namespace. **Disabled** by default.  |
 |  ''nswildcards''  |  Replace wildcards such as ''@USER@'' in the namespace string, as for page templates, using the ''parsePageTemplate'' function. For details, refer to [[:namespace_templates#replacement_patterns]]. (:!: Use at your own risk, could be used by malicious users to leak data).  | |  ''nswildcards''  |  Replace wildcards such as ''@USER@'' in the namespace string, as for page templates, using the ''parsePageTemplate'' function. For details, refer to [[:namespace_templates#replacement_patterns]]. (:!: Use at your own risk, could be used by malicious users to leak data).  |
 +|  ''pagename_sanitize''  |  Sanitize the page name of pages created by the ''Add page…'' button. When this is enabled, the feature respects the [[config:deaccent|deaccent]], [[config:userewrite|userewrite]], [[config:useslash|useslash]] and [[config:sepchar|sepchar]] configuration options. **Enabled** by default.  |
  
 To illustrate ''index_priority'' : if DokuWiki internal link would use ''index_priority'', the default value would be ''start,inside,outside''. To illustrate ''index_priority'' : if DokuWiki internal link would use ''index_priority'', the default value would be ''start,inside,outside''.
Line 141: Line 145:
 Source code is available on [[https://github.com/xif-fr/dokuwiki-plugin-catlist/|GitHub]]. Source code is available on [[https://github.com/xif-fr/dokuwiki-plugin-catlist/|GitHub]].
  
 +While this plugin is somewhat maintained, the author does not have much time to dedicate to it and does not use docuwiki presently. I would be happy to transfer the ownership to an actual user.
 ==== Change Log ==== ==== Change Log ====
  
Line 230: Line 235:
     * implemented ''-exclude:{}'' option     * implemented ''-exclude:{}'' option
     * implemented negation of regex exclusion options     * implemented negation of regex exclusion options
 +  * **2022-06-25**
 +    * added ''pagename_sanitize'' option
 +    * added sorting by date
 +  * **2022-08-07**
 +    * added Collator sorting
 +    * bug fixing
 +  * **2023-12-16**
 +    * fix bug with the add page button in side bar
  
 ==== Known Issues and Wish List ==== ==== Known Issues and Wish List ====
Line 238: Line 251:
  
   * English   * English
-  * French 
   * Chinese (Simplified)   * Chinese (Simplified)
-  * Russian +  * French
-  * Japanese+
   * German   * German
-  * Spanish 
   * Italian   * Italian
 +  * Japanese
 +  * Russian
 +  * Spanish
 +
  
-Help is welcome !+[[https://translate.dokuwiki.org/plugin/catlist|Help is welcome!]]
  
 ===== Discussion ===== ===== Discussion =====
  
 **Please send me an e-mail at [[xcodexif@xif.fr]]** **Please send me an e-mail at [[xcodexif@xif.fr]]**
plugin/catlist.1627215639.txt.gz · Last modified: 2021-07-25 14:20 by xif

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