search
AI OnAI Off
Hi Daniel,
This looks more like a CMS UI layout/bootstrap issue than a problem with optimizely-content-tree
RegisterOptimizelyWebComponents() loads the web components, but it does not provide everything that CommonLayout.cshtml adds around the CMS UI:
Since it works with:
/CmsUIViews/Views/Shared/CommonLayout.cshtml
I would compare the rendered HTML from both layouts and check what your custom layout is missing
Cheers,
Wojciech
Hi
Following on from this older question I am trying to use the optimizely-content-tree web component in an admin view, to allow users to select a node in the content as a starting point for a content activity search. I have added the component to a view inside a div containing a call to @Html.ApplyPlatformNavigation() and a call to @Html.Raw(Html.RegisterOptimizelyWebComponents()) which seems to cause the page to load optimizely-web-components.js. But when the page loads there is a Javascript exception - TypeError: Cannot read properties of undefined (reading 'value') - in optimizely-web-components.js and the button that would open the content tree is not displayed. Has anyone else had this problem? I can get it to work if I use the layout file /CmsUIViews/Views/Shared/CommonLayout.cshtml as suggested in the older post, so all is not lost, but we do have a custom admin layout that I'd prefer to use for consistency.
Thanks,
Daniel Lack