How to link community with wiki pages programatically using IBM SBT

84 Views Asked by At

Can anyone please tell me how to link the community while creating wiki pages programmatically using javascript. While working with a wiki on the playground, wiki pages are getting created but it is not under any community. Community id is null.

Where to configure the community while creating a wiki page programmatically using javascript.

Thanks in Advance,

1

There are 1 best solutions below

1
rajmeet singh On

You need to set the community id for the wiki like below

var wiki = wikiService.newWiki(); 
wiki.setTitle(title);
wiki.setCommunityUuid(communityId);
wikiService.createWiki(wiki);