Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Simple wiki linking syntax support for Plone

Project Description

collective.simplewiki

Provides simple wiki-style linking to other content within a Plone site.

Text that is wrapped with (()) or [[]] is rendered as a link.

The wrapped text is used to look up content items within the site, as either ID or title.

If the content item exists on the site, the rendered link is to that item.

The link is resolved in the following order:

  1. a matching ID within the same folder
  2. a matching title within the same folder
  3. a matching ID somewhere else in the site
  4. a matching title somewhere else in the site

If none of these match (i.e., a content item by that ID or title does not exist), the rendered link is to the add form for a page (“Document” content type), with the Title field pre-filled with the text wrapped by (()) or [[]].

Example

The following example shows how text is rendered on a new local Plone site named “Wiki” containing the default welcome page (ID: front-page, title: “Welcome to Plone”)

The text:

This is a link to a ((test page)).

Whatever you do, don't [[try this at home]]!

If in doubt, link to ((front-page)) or to ((front page)).

You can also link to [[Welcome!]] or [[Welcome]] or [[Welcome to Plone]].

is rendered as:

<div class="simplewiki-container">
  <p>This is a link to a
    <a href="http://localhost:8080/Wiki/++add++Document?form.widgets.IShortName.id=test page&amp;form.widgets.IDublinCore.title=test page" title="Create missing content">+ test page
    </a>.
  </p>
  <p>Whatever you do, don't
    <a href="http://localhost:8080/Wiki/++add++Document?form.widgets.IShortName.id=try this at home&amp;form.widgets.IDublinCore.title=try this at home" title="Create missing content">+ try this at home
    </a>!
  </p>
  <p>If in doubt, link to
    <a href="http://localhost:8080/Wiki/front-page" title="Welcome to Plone">Welcome to Plone
    </a> or to
    <a href="http://localhost:8080/Wiki/++add++Document?form.widgets.IShortName.id=front page&amp;form.widgets.IDublinCore.title=front page" title="Create missing content">+ front page
    </a>.
  </p>
  <p>You can also link to
    <a href="http://localhost:8080/Wiki/++add++Document?form.widgets.IShortName.id=Welcome!&amp;form.widgets.IDublinCore.title=Welcome!" title="Create missing content">+ Welcome!
    </a> or
    <a href="http://localhost:8080/Wiki/++add++Document?form.widgets.IShortName.id=Welcome&amp;form.widgets.IDublinCore.title=Welcome" title="Create missing content">+ Welcome
    </a> or
    <a href="http://localhost:8080/Wiki/front-page" title="Welcome to Plone">Welcome to Plone
    </a>.
  </p>
</div>

Comments:

  • The entire rich text field is wrapped in a <div> with the class simplewiki-container.
  • ((test page)) links to an add form.
  • [[try this at home]] links to an add form because no content item exists by that ID or title on the site.
  • ((front-page)) links to the site’s default front page.
  • ((front page)) links to an add form because no content item exists by that ID or title on the site.
  • [[Welcome!]] and [[Welcome]] do not match any content item by ID nor by full title, but [[Welcome to Plone]] links to the default front page since its title matches fully.

Installation

Install collective.simplewiki by adding it to your buildout:

[buildout]

 ...

 eggs =
     collective.simplewiki

and then running “bin/buildout”

Plone Compatibility

This add-on has been tested with Plone 5.0 and 5.1.

License

The project is licensed under the GPLv2.

Acknowledgements

This add-on was developed by Wildcard Corp. and graciously funded and released to the community by Zombie Orpheus Entertainment.

Thanks to Ben Dobyns of Zombie Orpheus Entertainment and Hawke Robinson of RPG Research

Changelog

1.0.1 (2017-01-06)

  • Fix sortable title lookup for wiki pages [vangheem]

1.0.0 (2017-01-03)

  • documentation [tkimnguyen]
  • initial release [vangheem]
Release History

Release History

This version
History Node

1.0.1

History Node

1.0.0

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
collective.simplewiki-1.0.1.tar.gz (16.7 kB) Copy SHA256 Checksum SHA256 Source Jan 6, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting