On May 2, 2007, at 10:53 AM, Guillaume Lerouge wrote:
Hi,
You should check the FAQClassSheet page.
You will find that the code looks something like:
<dl> #foreach($prop in $class.properties) <dt> *${prop.prettyName}* </dt> <dd>$doc.display($prop.getName()) </dd> </dl>
That is, it takes the properties you choose to use and displays them as a list of words with their definitions below using these tags: http://www.w3.org/TR/html401/struct/lists.html#h-10.3
If instead you want the results to be displayed as a table, you should change the html on the FAQClassSheet to this:
<table border="1" cellspacing="0" cellpadding="10"> #foreach($prop in $class.properties) <tr> <td> *${prop.prettyName}* </td> <td>$doc.display($prop.getName())</td> </tr> #end </table>
or even better: {table} Property | Value #foreach($prop in $class.properties) *${prop.prettyName}* | doc.display($prop.getName()) #end {table} That said I don't recall us changing anything since beta 1 but maybe I just don't recall. If there's something wrong in the FAQ tutorial please let us know so that we can fix it. Thanks -Vincent
Once this is changed you will get the results in a table.
The only thing that changed is the default code used when you create a new ClassSheet. You can actually change that code to have it display whatever you want :-). For instance check the Applications page on XWiki.org , or give a look to the ClassSheet pages (typically at http://www.xwiki.org/xwiki/bin/view/XWiki/ NameClassSheet/?viewer=code , where Name could be FAQ, Reference, Application, Calendar and so on...)
Hope this helps,
Guillaume
On 02/05/07, shivshan <[email protected]> wrote:
Hi I have successfully followed the tutorial on creating an FAQ application on xwiki.org. However, i dont get a table with border encompassing the question and answer. Here is the HTML from the browser for an actual document:
<dl> <dt> Question </dt> <dd>How do i use FAQ?</dd> <dt> Answer </dt> <dd>use the FAQ only for questions that do not need lengthy answers. Answers to the FAQ should be short and should not exceed a few lines with no screenshots or attachements.</dd> </dl>
AFAIK, this was working well with Beta1. Did anything change? Or should i create the answer and question properties with non-default values? Thanks Shiva