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

Lyes Bandou, Paul Pantiru

Active Installs7
Rating
Rate!
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

  • Closed ZEM-11 Images added in the included document are not displayed in the main page
  • Closed ZEM-10 The first title coming from the content is not interpreted

v1.3

  • Closed ZEM-9 Do not display the title anymore when displaying the macro
  • Closed ZEM-3 Title and Content field can be using the docContent and docTitle

v1.2

  • Closed ZEM-8 The "Read more" button appear when the link is void
  • Closed ZEM-7 The buttons are too big, and generate too much white space

v1.1

  • Closed ZEM-6 Allow the zone macro to be added inline
  • Closed ZEM-2 The top of the sections intersect with the content above it, css must be fixed

v1.0

  • Closed ZEM-1 Create the "Zone Edit" Macro

Dependencies

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

Tags:
Created by Paul Panțiru on 2016/02/23 15:56
    

Get Connected