Wiki source code of FAQ

Version 5.1 by Vincent Massol on 2011/10/28

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

Get Connected