Hi,
I would like some direction in learning to understand things like this (code I found in
your demo database):
#set($obj = $doc.getObject("XWiki.FAQClass","language",$language,
true))
#set($class = $obj.xWikiClass)
#foreach($prop in $class.properties)
1.1 ${prop.prettyName}:
$doc.display($prop.getName(), "rendered", $obj)
<br />
#end
...will I have to look at the code to understand usage on things like
"XWiki.FAQClass.properties" in my scripts? Or is there another resource?
The above works, but what I really want to do is modify that code to loop thru the objects
present in a "table" such as "Blog.Categories" that came with demo.
...But in a nested loop:
#set($obj = $doc.getObject("XWiki.MyTable","language",$language,
true))
#set($class = $obj.xWikiClass) <--- what is this?
#foreach(...object in that class??...)
1 ${...thatObject.Name}
#set ($sql = ", BaseObject as obj where obj.name=CONCAT(XWD_WEB,'.',XWD_NAME)
and obj.className='Csdg.ArticleClass' and
obj.name<>'Csdg.ArticleClassTemplate'")
#foreach ($item in $xwiki.searchDocuments($sql))
#set($bentrydoc = $xwiki.getDocument($item))
#set($bentryobj = $bentrydoc.getObject("Csdg.ArticleClass",
"language", $language, true))
#if (${bentrydoc.display("audience","view", $bentryobj)} ==
"Users")
* [$item]
#end
#end
#end
...I'm not sure how much help to expect with this, but any comment would be great.
thank you in adv.
-Ken