Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

CSR for Group

$
0
0

HI, colleagues!

I have a code CSR

overrideCtx.Templates.Group=CustomGroup;
overrideCtx.Templates.Item= customItem;
and
functionCustomGroup(ctx,group, groupId, listItem, listSchema, level, expand){//var html = '<ul id="list1">' + listItem[group] + '</ul>';
    html ='<ul id="list1">'+ listItem[group]+ listItem;
    html +='</ul>';return html;}function customItem(ctx){var ret ="<li><div>"+ ctx.CurrentItem.Title+"</div></li>";return ret;}

but it generates separate blocks
<ulid="list1">123</ul><li><div>123</div></li><li><div>123</div></li>
how to make the blocks were elements within the block groups like this
<ulid="list1">123<li><div>123</div></li><li><div>123</div></li></ul>

Viewing all articles
Browse latest Browse all 7589

Trending Articles