Thanks for the help. I will add the JIRA issue to cover this.
Hi SJB,
Ok, I've checked the source code and I see it's not fully supported
as an API.
However it's possible to do but it requires to have programming rights.
There's a method in XWikiDocument:
public String getContentOfSection(int sectionNumber) throws
XWikiException
So calling the following should work:
#set ($content = $doc.getDocument().getContentOfSection(1))
Then you'll need to render it:
$xwiki.renderText($content, $doc)
Note: The $doc.getDocument() API is the one that requires programming
rights as it gives you access to the non API XWikiDocument class.
Note that we reserve the right to modify that class and change
methods, remove them or add new ones. The only stable API is the API
one (i.e. The Document class).
Could you please create a JIRA issue to request a new API for doing
an includeInContext/IncludeTopic with a section?
Thanks
-Vincent
On Sep 27, 2007, at 5:55 PM, SJB wrote:
Does no one have ideas about this, or is my
question too easy/hard/
obvious
to be bothered with, or was my question unclear? I simply want to use
something like #includeTopic (or some equivalent velocity scirpt)
with a
portion of a document, associated wiht a heading (a section),
instead of a
whole document.
I have been searching all your forums, digging through velocity
scripting
examples, reading the API documentation, and it seems that using
DocumentSection should somehow be the answer, but I can't figure
out how.
Has this been addressed somewhere that I can't find?
> I have been testing out Xwiki for a couple of months now and I am
> very
> impressed with it. One feature that I can't seem to find though is
> the
> ability to include one section of a page instead of a whole page.
> Is this
> supported? Or is there a way to write a macro that does this?
>
> -SJB
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users