Zone Edit Macro

Last modified by Admin on 2021/03/17 21:20

cogCreates an editable zone into your page.
TypeXAR
CategoryMacro
Developed by

Lyes Bandou, Paul Pantiru

Active Installs7
Rating
0 Votes
LicenseGNU Lesser General Public License 2.1

Installable with the Extension Manager

Description

The zone macro lets you insert an editable section, that stores the content into another document. The section displays a little pencil (both in view and inline mode) in the top right corner for the users that have edit rights, which if clicked redirects you to the inline mode of the document storing the content and lets you modify the title, content and a "Read more" link. 

Usage

Insert the following macro on the page you want the editable section.

## Show the content of the document without the title
{{zone document="Space.Page" /}}

or

## Show the content of the document with the title
{{zone document="Space.Page" showTitle=true/}}

The document given as parameter must exist. You can add a ZoneCode.ZoneClass object and add some content in there. If the document does not have the object already, it will be added automatically and you will be able to edit after a refresh of the document from which you called the macro.

When editing a zone you have the posibility to edit:

  • The title of the section
  • The content of the section
  • And the Read more link (Can be a wiki page or external link)

If you insert a link in the link section, a "Read more" button will appear.

If you decide to write the velocity code in the included document, then it's worth mentioning that the context will be that of the included document and not that of the document calling the macro.

This is how a section looks like in view mode, with no additional html or css attached, when not hovered:

not_hovered.png

And when hovered:

when_hovered.png

If you click the edit button (seen only when hovering the section), you will be redirected to the inline mode of the document storing the your content:

editing_section.png

Prerequisites & Installation Instructions

We recommend using the Extension Manager to install this extension (Make sure that the text "Installable with the Extension Manager" is displayed at the top right location on this page to know if this extension can be installed with the Extension Manager). Note that installing Extensions when being offline is currently not supported and you'd need to use some complex manual method.

You can also use the following manual method, which is useful if this extension cannot be installed with the Extension Manager or if you're using an old version of XWiki that doesn't have the Extension Manager:

  1. Log in the wiki with a user having Administration rights
  2. Go to the Administration page and select the Import category
  3. Follow the on-screen instructions to upload the downloaded XAR
  4. Click on the uploaded XAR and follow the instructions
  5. You'll also need to install all dependent Extensions that are not already installed in your wiki

Release Notes

v1.4

v1.3

v1.2

v1.1

v1.0

Dependencies

Dependencies for this extension (org.xwiki.contrib.zoneedit:zoneedit-macro 1.4):

Tags:
    

Get Connected