Wiki source code of FAQ
Version 10.3 by Vincent Massol on 2012/10/26
Hide last authors
author | version | line-number | content |
---|---|---|---|
![]() |
1.1 | 1 | {{velocity output="false"}} |
![]() |
4.1 | 2 | $xwiki.jsx.use("FAQCode.SkinExtension") |
3 | $xwiki.ssx.use("FAQCode.SkinExtension") | ||
![]() |
1.1 | 4 | ## If this page is called with createFAQ=true then create a new page using the FAQTemplate template |
5 | #if ($request.createFAQ == "true") | ||
![]() |
10.3 | 6 | #set ($newFAQReference = $services.model.createDocumentReference('', 'FAQ', "${request.question}")) |
7 | $response.sendRedirect($xwiki.getURL($newFAQReference, "inline", "$!{request.queryString}&title=${request.question}")) | ||
![]() |
1.1 | 8 | #end |
9 | {{/velocity}} | ||
10 | |||
11 | {{box cssClass="faqAbout"}} | ||
![]() |
7.1 | 12 | **Frequently Asked Questions (FAQ) are an easy way to find answers to most of your questions about XWiki.** |
![]() |
6.1 | 13 | |
![]() |
10.2 | 14 | If you have a question you should verify if it's already in the FAQ list. If not then you should [[post a message on the XWiki Mailing List/Forum>>dev:Community.MailingLists]]. |
![]() |
6.1 | 15 | |
16 | The strategy is then for people who know the answer to create a new FAQ entry here about the question and reply in the mail with the link to the new FAQ Entry. In this manner we will quickly enrich this FAQ database. | ||
![]() |
1.1 | 17 | {{/box}} |
18 | |||
19 | (% class="centered" %) ((( | ||
20 | |||
21 | (% class="faq-link search-faq" %)((( | ||
22 | Search FAQ... | ||
23 | ((( | ||
24 | {{velocity}} | ||
25 | {{html}} | ||
26 | <form action="$xwiki.getURL("FAQCode.FAQSearch")"> | ||
27 | <input type="hidden" name="space" value="FAQ" /> | ||
28 | <input type="text" name="text" value="question text..." size="25" class="withTip" /> | ||
29 | <span class="buttonwrapper"> | ||
30 | <input class="button" type="submit" value="Search" /> | ||
31 | </span> | ||
32 | </form> | ||
33 | {{/html}} | ||
34 | {{/velocity}} | ||
35 | ))) | ||
36 | ))) | ||
37 | |||
38 | (% class="faq-link add-faq" %)((( | ||
39 | Contribute FAQ... | ||
40 | |||
41 | ((( | ||
42 | {{velocity}} | ||
43 | {{html}} | ||
44 | #if ($isGuest) | ||
45 | 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>. | ||
46 | #else | ||
47 | <form action="" id="newfaq"> | ||
48 | <input type="hidden" name="parent" value="FAQ.WebHome" /> | ||
49 | <input type="hidden" name="template" value="FAQCode.FAQTemplate" /> | ||
50 | <input type="hidden" name="createFAQ" value="true" /> | ||
![]() |
5.1 | 51 | <input class="withTip" type="text" name="question" value="question text..." size="25"/> |
![]() |
1.1 | 52 | <span class="buttonwrapper"> |
53 | <input class="button" type="submit" value="Add" /> | ||
54 | </span> | ||
55 | </form> | ||
56 | {{/html}} | ||
57 | #end | ||
58 | {{/velocity}} | ||
59 | ))) | ||
60 | ))) | ||
61 | |||
62 | ))) | ||
63 | |||
![]() |
9.1 | 64 | (% class="clearfloats" %)((()))(%%) |
![]() |
1.1 | 65 | |
![]() |
10.1 | 66 | {{faq filter="space=FAQ"/}} |
![]() |
8.1 | 67 | |
![]() |
1.1 | 68 | (% class="hidden" %) ((( |
69 | Temporary provide a link for robots to index all FAQs. | ||
70 | In the future, this link will be provided via a sitemap. | ||
71 | [[FAQCode.AllFAQList]] | ||
72 | ))) | ||
73 |