Hi Shiva,
On Apr 16, 2007, at 5:43 PM, shivshan wrote:
Hi
I am a relative newcomer to Xwiki, and still getting used to Classes,
Objects etc. However, i have an urgent need for a knowledge base
that is
running on Xwiki.
In each space, i want any new page created to have the same
structure. For
ex:
1 XYZ Application
Introduction in to XYZ in a few sentences
1.1 How to use XYZ
1.1.1 Login
1.1.1 Edit
1.1.1 Save
1.1 Troubleshooting
1.1.1 Login Not working
1.1.1 Save not working
1.1 References
Once a new page in this space is created, this code will be
available by
default. The user then modifies content retaining the structure.
This should be possible but i am not able to figure out how. These
pages
don't have any forms so am not sure whether i should use the
includeform
macro.
Any pointers to existing documentation would be very helpful.
If you want the structure to be read only so that the users cannot
modify them you'll need to use forms as follows:
1) Create a Class. Say MyClass. Add the fields you need
2) Create a class sheet in which you use $doc.display("fieldname",
$obj) where obj is your Object. For example:
#set($obj = $doc.getObject("XWiki.XWikiUsers"))
For example in MyClassSheet:
#set($obj = $doc.getObject("XWiki.MyClass"))
...
1.1 How to use
$doc.display("howtouse", $obj)
1.1 Troubleshooting
...
3) Create a template document that is used when you create a new
document
For more help see the FAQ tutorial on
http://www.xwiki.org/xwiki/bin/
view/DevGuide/FAQTutorial
Thanks
-Vincent