DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:linkpagechild

linkpagechild Plugin

Compatible with DokuWiki

  • 2024-02-06 "Kaos" unknown
  • 2023-04-04 "Jack Jackrum" unknown
  • 2022-07-31 "Igor" unknown
  • 2020-07-29 "Hogfather" yes

plugin Links & media inclusions whose target path starts with '::' resolve to the namespace with the name of the current page, under the current namespace.

Last updated on
2021-10-03
Provides
Syntax
Repository
Source

Tagged with links, media, syntax

linkpagechild is a syntax plugin that adds a small behavior to how paths in page links and media links are interpreted, interpreting “::” at the start of the path as “a sub-namespace under the current namespace, named for the current page”. This makes it easy to lay out your attachments like Zim Desktop Wiki does — attachments are in a folder named for the page containing them

Installation

Install the plugin using the Plugin Manager and the download URL above, which points to latest version of the plugin. Refer to Plugins on how to install plugins manually.

Examples/Usage

On a page called “:blog:2018-08:my-cat-did-something-funny”, the following media link

{{::cat-picture.jpg}}

would resolve to the media attachment “:blog:2018-08:my-cat-did-something-funny:cat-picture.jpg”.

Likewise, on a page called “:howto” the following page link

[[::capture-the-best-cat-picture]]

would resolve to the page “:howto:capture-the-best-cat-picture”.

Syntax

This plugin augments the behavior of standard page links and media links as described in the DokuWiki syntax man page. Follow the syntax explained there, and use the “::” prefix as a shortcut for “a sub-namespace under the current namespace, named for the current page”.

Configuration and Settings

This plugin does not have any configurable behavior.

Development

Change Log

  • 2021-10-03
    • Re-released the plugin in Git repostitory at SourceHut after shutdown of Mercurial service by Bitbucket 404ed the old hosted repository.
  • 2018-08-05
    • Initial release.

Known Bugs and Issues

Please see the public issue tracker.

FAQ

(No FAQs yet.)

Discussion

Currently leading search and discussion on how to link to a media in relativ way by using a other media (image) as teaser/linkdisplay here [(for case) Solved] Is there a syntax to directly link to media-files in "same" ns?, my person wonders if the plugin allows a “trick” or could be enriched by this missing possibility for links on DW someting like [[{{::mediafile.xyz}}|{{any_image}}]] or a resolve that adds the _media-path + path into this image link url, maybe by something like :::, [[:::mediafile.xyz|{{any_image}}]]. (me it be pardoned if using this place here in probably not welcome way). — Samana Johann 2018-10-11 02:12
plugin/linkpagechild.txt · Last modified: 2021-10-03 04:34 by brendan-kidwell

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