I've been getting on quite well working through a bunch of Plugin examples as I get used to coding with Telligent.. so far so good. It's a nice change to be able to run a plugin build & see the changes within 20 seconds!
One thing I'm doing as a proof-of-concept is render a widget via a contentFragmentPage XML definition.. this works pretty well as it stands.. giving me a custom page which renders the widget of my choosing into the page (nice to be able to do this via the plugin rather than relying on someone editing a page & dragging widgets into it).
void INavigable.RegisterUrls(IUrlController controller)
{
string debugUserWidget = @"<contentFragmentPage pageName=""common-home"" isCustom=""false"" layout=""Content"" themeType=""0c647246-6735-42f9-875d-c8b991fe739b"">
<regions>
<region regionName=""Content"" >
<contentFragments>
<contentFragment type=""Telligent.Evolution.ScriptedContentFragments.ScriptedContentFragment, Telligent.Evolution.Platform::b79ba25fa17048ba83bb844fc80bab5b"" showHeader=""False"" cssClassAddition=""no-wrapper with-spacing responsive-1"" isLocked=""False"" configuration="""" />
</contentFragments>
</region>
</regions>
<contentFragmentTabs />
</contentFragmentPage>";
// Render a widget into a custom page (which has a full site header + footer)
controller.AddPage("e14-examples-widget", "examples/widget", null, null, "examples/widget", new PageDefinitionOptions
{
HasApplicationContext = false,
SetCustomPageOutput = (context, outputController) => { },
ParseContext = (context) => { },
Validate = (context, accessController) => { },
DefaultPageXml = debugUserWidget
});
}
One thing I was wondering whether it's possible to do is render it without the site header + footer.. essentially using controller.AddRaw, but the RawDefinitionOptions don't have any property for me to pass the XML definition into.
Any ideas?