Thanks Thomas, But the code in the example is just to show the outline... Believe me: I need HTML around the foreach loop to set enclosing div's and jquery and/or bootstrap classes But your help was great; including the wiki="true" parameter in the html macro makes the display work fine... Thanks 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]> ________________________________ From: users <[email protected]> on behalf of Thomas Mortagne <[email protected]> Sent: 07 October 2016 09:56:40 To: XWiki Users Subject: Re: [xwiki-users] Display macro On Fri, Oct 7, 2016 at 9:48 AM, Gerritjan Koekkoek <[email protected]> wrote:
When in Velocity generating HTML
{{velocity}}
{{html}}
#foreaech()
#if(display instead of include is required)
{{display reference ='page that only works when using display'/}}
#else
#includeInContext(page that does not require display)
#end
{{/html}}
{{/velocity}}
What is the velocity macro (or code snippet) to make it work?
As documented the {{display}} or {{include}} does not work from within the velocity and/or html macro. Documentation could maybe be improved by adding what to do when this calling from within Velocity/html is required
Using {{display}} or {{include}} works well in Velocity. But html macro disable wiki syntax by default and those are wiki syntax (see http://extensions.xwiki.org/xwiki/bin/view/Extension/HTML+Macro#HParametersd...). That said there is no reason to use html in the example you are giving (use {{include}} instead of #includeInContex).
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