In your macro you could get the document and then use something like
what is described in
http://www.xwiki.org/xwiki/bin/view/ReleaseNotes/ReleaseNotesXWiki61RC1#HAccesstoBlockMatchersfromvelocityscripts
to extract the GroupBlock you want (i.e. the one with a parameter
"class" equals to "lead" from what I understood).

On Mon, Jun 8, 2015 at 9:31 AM, Gerritjan Koekkoek
<[email protected]> wrote:
> I know wiki has a nice macro to select a part of a page based on headers.
>
> But headers can be changed and when you translate the page the page holding 
> the macro wil have a ugly error.
>
>
> {{include reference="DocumentToInclude" section="HMySection"}}
>
>
> How could I do it based on the following wiki syntax:
>
>
> (%class="lead")(((
>
> Text to be included
>
> )))
>
> Text to be excluded
>
>
> 'Text to be included' and 'text to be excluded' can have any wiki-markup
>
>
> I would like to create a macro that would look like
>
> {{myGetSectionMacro reference="DocumentToInclude" onlyLeadText="true"}}
>
>
> I could get the whole page by
>
> {{myGetSectionMacro reference="DocumentToInclude" onlyLeadText="false"}}
>
>
> I could get only 'Text to be excluded' by
>
> {{myGetSectionMacro reference="DocumentToInclude" onlyLeadText="false" 
> onlyRestText="true"}}
>
> Any suggestion is welcome
> Note that the used Class is a bootstrap class that will add markup to the 
> section that will show it as a INTRO text...
>
>
> Gerritjan Koekkoek
> Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS
> Visit our website<http://www.cdlsworld.org>
> Facebook<https://www.facebook.com/gerritjan.koekkoek>
> email<[email protected]>
>
>
>
> _______________________________________________
> users mailing list
> [email protected]
> http://lists.xwiki.org/mailman/listinfo/users



-- 
Thomas Mortagne
_______________________________________________
users mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to