On Tue, Nov 27, 2012 at 12:44 PM, Gerritjan Koekkoek <[email protected]> wrote: >
> I read in display macro documentation that you can display a section? True. > But how do you specify a section in a document? Document sections have a pencil icon at the far right side of the section title which makes them editable. They are normally generated by headings ( http://platform.xwiki.org/xwiki/bin/view/Main/XWikiSyntax#HHeadings ) but not from (code) macros. Simply put, wrap: == Heading Title == in {{velocity}} and you will loose the pencil icon and thus the section, even though visually there's no difference besides the pencil icon. > I would like to understand this using the wysywig editor and using wiki > editor? In WYSIWYG editor you need to apply the Title N style and in the Wiki editor you need to use heading syntax, but outside macros. > And what velocity code would give me a section header and a section body > (without the header)? As you already know, there is $someDocument.getSections().get($sectionIndex).sectionTitle but nothing for the section body besides this protected API (needs programming rights): $someDocument.document.getContentOfSection($sectionNumber) > > The only thing I can think of is the heading levels in the wysywig editor, > but a document that has a header (level 2) and some text below the header > does not seem to have sections if i call Are you sure the heading is not inside a macro? Hope this helps, Marius > #set($menuSections = $menu1Document.getSections()) > _______________________________________________ > users mailing list > [email protected] > http://lists.xwiki.org/mailman/listinfo/users _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
