Wiki source code of FAQ

Version 3.2 by Vincent Massol on 2011/10/28

Show last authors
1 {{velocity output="false"}}
2 ## If this page is called with createFAQ=true then create a new page using the FAQTemplate template
3 #if ($request.createFAQ == "true")
4 $response.sendRedirect($xwiki.getURL("FAQ.${request.name}", "inline", "$!{request.queryString}&title=${request.name}"))
5 #end
6 {{/velocity}}
7
8 {{box cssClass="faqAbout"}}
9 Frequently Asked Questions (FAQ) are an easy way to find answers to most of your questions about XWiki.
10 {{/box}}
11
12 (% class="centered" %) (((
13
14 (% class="faq-link search-faq" %)(((
15 Search FAQ...
16 (((
17 {{velocity}}
18 {{html}}
19 <form action="$xwiki.getURL("FAQCode.FAQSearch")">
20 <input type="hidden" name="space" value="FAQ" />
21 <input type="text" name="text" value="question text..." size="25" class="withTip" />
22 <span class="buttonwrapper">
23 <input class="button" type="submit" value="Search" />
24 </span>
25 </form>
26 {{/html}}
27 {{/velocity}}
28 )))
29 )))
30
31 (% class="faq-link add-faq" %)(((
32 Contribute FAQ...
33
34 (((
35 {{velocity}}
36 {{html}}
37 #if ($isGuest)
38 You need first to <a href="${escapetool.xml($xwiki.getURL("Main.WebHome", "login", "xredirect=$doc.externalURL"))}">log in</a> or <a href="${escapetool.xml($xwiki.getURL("xwiki:Main.WebHome", "register", "xredirect=$doc.externalURL"))}">register</a>.
39 #else
40 <form action="" id="newfaq">
41 <input type="hidden" name="parent" value="FAQ.WebHome" />
42 <input type="hidden" name="template" value="FAQCode.FAQTemplate" />
43 <input type="hidden" name="createFAQ" value="true" />
44 <input class="withTip" type="text" name="id" value="question text..." size="25"/>
45 <span class="buttonwrapper">
46 <input class="button" type="submit" value="Add" />
47 </span>
48 </form>
49 {{/html}}
50 #end
51 {{/velocity}}
52 )))
53 )))
54
55 )))
56
57 (% class="clearfloats" %)((()))(%%)
58
59 {{velocity}}
60 #set($columns = ["doc.title", "doc.creationDate", "doc.date"])
61 #set($columnsProperties = {
62 "doc.title" : { "type" : "text", "link" : "view" },
63 "doc.creationDate" : { "type" : "date" },
64 "doc.date" : { "type" : "date" }
65 })
66 #set($options = {
67 "tagCloud":true,
68 "resultPage":"FAQCode.FAQJSON",
69 "className":"FAQCode.FAQClass",
70 "selectedColumn":"doc.creationDate",
71 "defaultOrder":"desc",
72 "translationPrefix" : "faq.",
73 "rowCount": 30,
74 "extraParams" : 'space=FAQ'
75 })
76 #livetable("extensions" $columns $columnsProperties $options)
77
78 (% class="hidden" %) (((
79 Temporary provide a link for robots to index all FAQs.
80 In the future, this link will be provided via a sitemap.
81 [[FAQCode.AllFAQList]]
82 )))
83 {{/velocity}}

Get Connected