Last modified by Simon Urli on 2023/10/10

<
From version < 93.1 >
edited by Vincent Massol
on 2017/01/17
To version < 94.1 >
edited by Vincent Massol
on 2017/01/17
>
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -247,7 +247,7 @@
247 247  
248 248  You will need to write the following code:
249 249  
250 -* A XWQL query that will find all your FAQ documents
250 +* A XWQL query that will find all your FAQ documents. Check the [[Query API documentation>>extensions:Extension.Query Module]] to know more about it.
251 251  ** The XWQL query looks for all documents that have a ##FAQ.FAQClass## object other than the template
252 252  ** If no document has been created yet, a warning message is displayed
253 253  * A piece of velocity code to display all those documents
... ... @@ -293,15 +293,16 @@
293 293  
294 294  You will have to define a template provider [[as explained on this page>>extensions:Extension.Administration Application||anchor="HCreatethetemplateprovider"]]
295 295  
296 -Go to your wiki's administration interface, in the "Templates" section (Administration -> Content -> Templates). Create a new template provider in the "FAQ" space and name it "FAQTemplateProvider"
296 +Go to your wiki's administration interface, in the "Templates" section (Administration -> Content -> Templates). Create a new template provider in the
297 +##FAQ## space and name it ##FAQTemplateProvider##
297 297  
298 298  You can then use the following values:
299 299  
300 -* Provider name: "FAQ Template Provider"
301 -* Template name "New FAQ entry"
302 -* Template to use: "FAQ.FAQTemplate"
301 +* Provider name: ##FAQ Template Provider##
302 +* Template name: ##New FAQ entry##
303 +* Template to use: ##FAQ.FAQTemplate##
303 303  
304 -If you'd like, you can restrict FAQ entries so that they're created only in the "FAQ" space. Once you're done, click "Save & View". Your template is now ready to be used! Users who click on the "Add >> Page" button will now have the option to create a new page using the FAQ template.
305 +If you'd like, you can restrict FAQ entries so that they're created only in the ##FAQ## space. Once you're done, click "Save & View". Your template is now ready to be used! Users who click on the "Add >> Page" button will now have the option to create a new page using the FAQ template.
305 305  
306 306  === Custom creation form ===
307 307  
... ... @@ -312,7 +312,7 @@
312 312  ** A check is done to verify the document doesn't exist yet
313 313  ** If everything's ok, the user is sent to the new document in inline edition mode
314 314  * The second part of the code is the actual FAQ creation form
315 -** It builds the name of the document to create it in the "FAQ" space
316 +** It builds the name of the document to create it in the ##FAQ## space
316 316  ** It sets the document parent as being the current document
317 317  ** It defines the template to use to create the new document
318 318  
... ... @@ -352,7 +352,7 @@
352 352  {{/velocity}}
353 353  {{/code}}
354 354  
355 -* Copy this code and paste it as Wiki content inside FAQ.WebHome, below the code that's already there
356 +* Copy this code and paste it as Wiki content inside ##FAQ.WebHome##, below the code that's already there
356 356  * Click "Save and View"
357 357  * A form to create new FAQ entries is now available on the page:(((
358 358  {{image reference="FAQsWithForm.png"/}}
... ... @@ -361,9 +361,10 @@
361 361  = Test the Application =
362 362  
363 363  Now let's just create a new document in our application to test it out.
365 +
364 364  If you previously chose to use a "Custom creation form" for creating new FAQ entries, follow these steps:
365 365  
366 -* Go to FAQ.WebHome
368 +* Go to ##FAQ.WebHome##
367 367  * Below the "Add a new question" header, enter a question (which will also be used as the document title) in the //Document// field
368 368  * Click //Create this FAQ//
369 369  * You can then enter your question in longer form using the //Question// field on the template, like this:(((
... ... @@ -372,7 +372,7 @@
372 372  * Click //Save & View// and then you will see the newly created document, like this:(((
373 373  {{image reference="FAQSheetView.PNG"/}}
374 374  )))
375 -* Go back to the "FAQ.WebHome" page to see the list of existing questions(((
377 +* Go back to the ##FAQ.WebHome## page (you can use the breadcrumbs) to see the list of existing questions(((
376 376  {{image reference="FAQsWithEntry.png"/}}
377 377  )))
378 378  
... ... @@ -379,6 +379,7 @@
379 379  = Conclusion =
380 380  
381 381  This tutorial has taught you how to use the Class Wizard app and it has detailed the concepts of classes, objects and properties and introduced the authoring templates and page design sheets.
384 +
382 382  You may also have learned a little bit about Velocity scripting in documents. You can use these basic concepts to build custom applications at the document or presentation layer of XWiki without having to compile or deploy code.
383 383  
384 384  As always, please take the time to make this document better for other users if you find ways that it can be improved as you read it for the first time.

Get Connected