<
From version < 55.2 >
edited by Guillaume Lerouge
on 2010/12/29
To version < 56.1 >
edited by Guillaume Lerouge
on 2010/12/29
>
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -171,11 +171,20 @@
171 171  
172 172  In this section, we will show how to use the [[Livetable Macro>>extensions:Extension.Livetable Macro]] to display the existing questions and answers.
173 173  
174 -{{code}}
174 +The livetable component will give users the ability to easily list and filter through existing FAQ documents. The macro is made of 3 parts:
175 +
176 +* The list of columns: for each entry, we will display the question, the date when it was created and a special column that lets users quickly modify entries
177 +* The properties of each column: for each column, we will define how it should be displayed, whether it should link to the entry and whether it should be filterable
178 +* The livetable options: those are options related to the display of the livetable (in this case we will to display a tag cloud and 10 rows by default)
179 +
180 +Here is the resulting code:
181 +
182 +{{code language="none"}}
183 +{{velocity}}
175 175  #set($columns = ["question", "doc.creationDate", "_actions"])
176 176  #set($columnsProperties = {
177 177   "question" : { "type" : "text", "link" : "view", "html" : "true", "sortable":true },
178 - "_actions" : {"actions": ["copy","delete","rename","rights"]}
187 + "_actions" : {"actions": ["edit","delete"]}
179 179  })
180 180  #set($options = {
181 181   "className":"FAQ.FAQClass",
... ... @@ -184,8 +184,13 @@
184 184   "rowCount": 10
185 185  })
186 186  #livetable("faq" $columns $columnsProperties $options)
196 +{{velocity}}
187 187  {{/code}}
188 188  
199 +* Copy that code and paste it in your page
200 +* Click "Save and View"
201 +* New FAQ entries will now be displayed on the page once you create them
202 +
189 189  === Using custom code ===
190 190  
191 191  You will need to write the following code:

Get Connected