Properties displayer macro
Display the properties of an object and corresponding values in a floating box |
Type | XAR |
Category | Macro |
Developed by | |
Active Installs | 3 |
Rating | |
License | GNU Lesser General Public License 2.1 |
Description
This macro displays a block with properties name and corresponding values from an object. As an example, it can be used in class sheets.
Example of usageEdit
(((
{{propertiesDisplayer className="Help.Applications.Movies.Code.MoviesClass" title="" backgroundColor="white" properties="title1, longText1" propertyNameClasses="col-sm-12" propertyValuesClasses="col-sm-12" blockClasses="col-sm-8" /}}
{{propertiesDisplayer className="Help.Applications.Movies.Code.MoviesClass" title="Properties" titleStyle="text-align: center; font-size: 16px; font-weight: bold; margin-top: 15px; margin-bottom: 10px;" properties="staticList1, databaseList1, date1, number1, boolean1" blockClasses="col-sm-4" propertyNameClasses="col-sm-3" propertyValuesClasses="col-sm-9" backgroundColor="#f5f5f5" style="border-radius: 10px; line-height: 25px; padding-bottom: 20px;" /}}
)))
(% class="row" %)
(((
== Content ==
{{propertiesDisplayer className="Help.Applications.Movies.Code.MoviesClass" title="" backgroundColor="white" properties="content1" blockClasses="col-sm-12" propertyNameClasses="hide" propertyValuesClasses="col-sm-12" /}}
)))
ResultEdit
ParametersEdit
Name | Description | Mandatory | Default |
---|---|---|---|
className | Object for which the properties are displayed | No | null |
properties | A list of ordered properties to be displayed for the object | No | |
displayEmptyValues | Display or not a null property. | No | true |
propertyNameClasses | Classes for the name of a property | No | col-sm-6 |
propertyValuesClasses | Classes for the value of a property | No | col-sm-6 |
blockClasses | Bootstrap columns for the block. | No | xform col-sm-6 |
style | CSS for the block. Note that the background color is another parameter. | No | border-radius: 10px; padding: 5px; line-height: 25px; padding-bottom: 20px; |
title | The title of the block | No | |
backgroundColor | Background color of the block | No | #f5f5f5 |
titleClasses | Classes for the title of the block | No | col-sm-12 |
titleStyle | CSS for the title of the block | No | font-weight:bold; |
propertyNameStyle | CSS for the propertyName column. | No | |
propertyValuesStyle | CSS for the propertyValue column. | No |
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:
- Log in the wiki with a user having Administration rights
- Go to the Administration page and select the Import category
- Follow the on-screen instructions to upload the downloaded XAR
- Click on the uploaded XAR and follow the instructions
- You'll also need to install all dependent Extensions that are not already installed in your wiki