A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More.
AI OnAI Off
A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More.
Hello,
The best way I have found to do this is the following:
var contentFragment = ServiceLocator.Current.GetInstance<ContentFragmentFactory>() .CreateContentFragment(block.ContentLink, block.ContentGuid, null); page.MainBody.Fragments.Add(contentFragment);
Be aware that the ContentFragmentFactory is marked as an unsupported internal API that might change without notice.
Hope this can help.
Hi,
I want to add content fragment in xhtml thorugh code i have got the ContentReference of the block. How to do i add block as content fragment in xhtml completely through code.
Cheers