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

Summary

Details

Page properties
Content
... ... @@ -165,6 +165,29 @@
165 165  
166 166  == Displaying existing FAQ entries ==
167 167  
168 +You have 2 options when it comes to displaying existing FAQ entries. You can either use the livetable component or write custom code in order to display them.
169 +
170 +=== Using the Livetable component ===
171 +
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 +
174 +{{code}}
175 +#set($columns = ["question", "doc.creationDate", "_actions"])
176 +#set($columnsProperties = {
177 + "question" : { "type" : "text", "link" : "view", "html" : "true", "sortable":true },
178 + "_actions" : {"actions": ["copy","delete","rename","rights"]}
179 +})
180 +#set($options = {
181 + "className":"FAQ.FAQClass",
182 + "translationPrefix" : "faq.",
183 + "tagCloud" : true,
184 + "rowCount": 10
185 +})
186 +#livetable("faq" $columns $columnsProperties $options)
187 +{{/code}}
188 +
189 +=== Using custom code ===
190 +
168 168  You will need to write the following code:
169 169  
170 170  * A HQL query that will find all your FAQ documents

Get Connected